Use that rule of thumb:
- If you found it in the Microsoft .NET Framework: it’s managed.
- If you went poking around MSDN yourself, it’s unmanaged.
Anything you’ve used P/Invoke calls to get outside of the nice comfy world of everything available to you in the .NET Framwork is unmanaged – and you’re now responsible for cleaning it up.