Rhubarb
Rhubarb

Reputation: 4003

What's the lifetime of an unmanaged DLL once it's been pInovked from managed code?

For example if you have a simple managed console app and a simple unmanaged C++ DLL. You pInvoke into a function in the C++ DLL, does the DLL stay loaded in the unmanaged process until said process comes down? Or does the DLL get unloaded at the completion of every pInvoke call?

Upvotes: 1

Views: 371

Answers (1)

Joel Lucsy
Joel Lucsy

Reputation: 8716

It stays in memory unless you explicity tell it to unload.

Upvotes: 2

Related Questions