Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Library not free'ed
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Library not free'ed

 Post Reply Post Reply
Author
Message
danpetitt View Drop Down
Senior Member
Senior Member


Joined: 17 July 2005
Location: United Kingdom
Status: Offline
Points: 109
Post Options Post Options   Thanks (0) Thanks(0)   Quote danpetitt Quote  Post ReplyReply Direct Link To This Post Topic: Library not free'ed
    Posted: 11 March 2007 at 2:29am
I see that the RichEdit library is not being free'ed in deconstruction.

CRichEditContext::CRichEditContext()

{
m_hInstance = LoadLibraryA("RICHED20.DLL");
....


Also, I dont think the "UxTheme.dll" is being free'ed either.

I am running an older version of BoundsChecker so its possible, its a mistake.
Back to Top
Oleg View Drop Down
Senior Member
Senior Member


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 12 March 2007 at 1:56am
Hi,
Yes, for static objects we don't call FreeLibrary intended , because destructors of static objects will be called in DlllMain and MSDN say : "It is not safe to call FreeLibrary from DllMain"
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
danpetitt View Drop Down
Senior Member
Senior Member


Joined: 17 July 2005
Location: United Kingdom
Status: Offline
Points: 109
Post Options Post Options   Thanks (0) Thanks(0)   Quote danpetitt Quote  Post ReplyReply Direct Link To This Post Posted: 12 March 2007 at 4:43am
I see, I thought you might call a "Cleanup" function at a known shutdown point rather than rely on a normal static deconstruction which happen in an unknown order and cause issues.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.047 seconds.