Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: winhelpviewer memory leak


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 2 - Last Post: Feb 10, 2015 12:07 PM Last Post By: John Farmer
John Farmer

Posts: 22
Registered: 11/12/10
winhelpviewer memory leak  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 7, 2015 1:35 PM
I am using BCB6 and have created a basic application using File|New|Application which contains no added code. When executed with codeguard enabled a memory leak is reported where winhelpviewer::initialization appears to allocate a 36 byte block which is never freed.

Is it possible to fix this issue, for example by a suitable modification to winhelpviewer.pas?

Is it possible to suppress this particular error message within codeguard?

Regards
FarmerJo
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: winhelpviewer memory leak  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 7, 2015 4:57 PM   in response to: John Farmer in response to: John Farmer
John wrote:

I am using BCB6 and have created a basic application using
File|New|Application which contains no added code. When executed
with codeguard enabled a memory leak is reported where
winhelpviewer::initialization appears to allocate a 36 byte block
which is never freed.

That is correct. The WinHelpViewer unit calls RegisterViewer() at startup,
which in turn creates a THelpManager object that is not being freed during
shutdown. This was fixed in Delphi 7 (and since there was no C++Builder
7, 8, or 2005, the fix did not appear in C++ until C++Builder 2006).

Is it possible to fix this issue, for example by a suitable
modification to winhelpviewer.pas?

WinHelpViewer Initialization Memory Leak
http://www.delphigroups.info/3/9/31052.html

How to suppress winhelpviewer resource leak in CodeGuard?
http://www.delphigroups.info/3/8/82495.html

Is it possible to suppress this particular error message within
codeguard?

No.

--
Remy Lebeau (TeamB)
John Farmer

Posts: 22
Registered: 11/12/10
Re: winhelpviewer memory leak  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 10, 2015 12:07 PM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
I have modified winhelpviewer.pas as suggested and added it to my project. Compilation is OK but get lots of linker errors of the form.

[Linker Error] Unresolved external '__fastcall Outline::TCustomOutline::~TCustomOutline()' referenced from C:\PROGRAM FILES (X86)\BORLAND\CBUILDER6\LIB\BCBSMP.LIB|.\cdiroutl.cpp

What do I need to do to resolve these linker errors?

Regards
FarmerJo
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02