Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


LoadLibrary and memory

This topic is 6202 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''ve got two questions. 1. When I use FreeLibrary to unload a dll I loaded, does windows free the memory used or is it still being used by my program? In other words, do I need to free it myself? 2. How fast are LoadLibrary, GetProcAddress, and FreeLibrary? If they''re very fast I''ll use them often. If they''re slow I won''t.

Share this post

Link to post
Share on other sites
1. When you use FreeLibrary(), windows unloads the module from your application, and if it isn''t used anymore, it releases it from memory. You should usually call this function once when your application is about to close.
2. They''re not exteremely fast, you should only use them once anyway, LoadLibrary and GetProcAddress when your application start (To load the module and get function addresses from it) and FreeLibrary() when your application is destroyed.

- Goblineye Entertainment
The road to success is always under construction

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!