Changes between Version 2 and Version 3 of Ticket #5228


Ignore:
Timestamp:
Sep 3, 2013, 12:15:59 AM (11 years ago)
Author:
damiandixon
Comment:

Rather than initially using LoadLibrary it might be more sensible to use GetModuleHandle first then fall back to LoadLibrary.

This would ensure that the library's reference count is only incremented once on first load of the library.

This is I think only a stop gap as I still need away of unloading the shared libraries.

The ideal solution is the match the LoadLibrary calls to FreeLibrary calls. From experience this is more than likely going to affect non-windows platforms.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #5228 – Description

    v2 v3  
    1 Loading a plugin on windows retains a library handle reference which causes memory problems.
     1Loading a plugin on windows retains a library handle reference which causes memory retention problems (potential multiple initialization).
    22
    33The function CPLGetSymbol on windows calls LoadLibrary. When LoadLibrary is called the DLL reference count is incremented.