Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / May 2004

Tip: Looking for answers? Try searching our database.

Detect memory leaks

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mircu - 28 May 2004 11:55 GMT
Hi,
I need a tool to check my applicationm for memory leaks. It uses mixed
code and for now I didn't find proper tool. My application is managed
c++ app and it uses mc++ wrappers for my unmanaged code (which uses
MFC). When I stop debugging there is info about memory leaks but I'm
sure that every wrappers deletes unmanaged objects in finalizers. So
maybe the finalizers aren't called? Is there a tool which could show me
leaked objects in mixed mode application? Raional Purify Plus can't
check it.

Regards,
mircu
Jochen Kalmbach - 28 May 2004 12:05 GMT
> When I stop debugging there is info about memory leaks but I'm
> sure that every wrappers deletes unmanaged objects in finalizers. So
> maybe the finalizers aren't called?

As a design suggestion: You should normally not use Finalizers!
Please use the IDisposable Interface/Pattern.

> Is there a tool which could show me
> leaked objects in mixed mode application? Raional Purify Plus can't
> check it.

You can try my LeakFinder: http://www.codeproject.com/tools/leakfinder.asp
It will only show you unmanaged CRT-Leaks.

Signature

Greetings
 Jochen

 Do you need a memory-leak finder ?
 http://www.codeproject.com/tools/leakfinder.asp

 Do you need daily reports from your server ?
 http://sourceforge.net/projects/srvreport/

mircu - 28 May 2004 13:40 GMT
> As a design suggestion: You should normally not use Finalizers!
> Please use the IDisposable Interface/Pattern.

When I started coding I followed the guide MS "Managed Extensions for
C++ Migration Guide" and there were deleting objects in destructors
(finalizers). When I'll be little less busy I'll apply Dispose pattern.

> You can try my LeakFinder: http://www.codeproject.com/tools/leakfinder.asp
> It will only show you unmanaged CRT-Leaks.

Thanks! It found some leaks but why there are I don't know. Could they
be reported because the memory leak checker is called before garbage
collector thread finishes?

Regards,
mircu

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.