search
Japanese Chinese Nederlands Espanol Italiano Deutsch Francais Twitter Rss Feeds
Mobile Application Development GroupsView
Pocketpc
Pocketpc Activesync
Pocketpc Developer
Pocketpc Phone_Edition
Windowsce App Development
Windowsce Embedded
Windowsce Platbuilder

Group SummariesView
.NET Framework
Access
BizTalk
Certifications
CRM
DDK
Exchange Server
FoxPro
French
French .NET
Games
German
German .NET
Graphic Design
IIS
Internet
ISA Server
Italian
Italian .NET
Maps
MCIS
Miscellaneous
Mobile Application Development
Money
MSN
Networking
Office
Ops Mgr
Publisher
Security
SharePoint
Small Business
Spanish
Spanish .NET
SQL Server
Systems Management Server
Transaction Server
Virtual PC / Virtual Server
Visual Studio
Win32
Windows 2000
Windows 2003 Server
Windows 7
Windows Live
Windows Media
Windows Update
Windows Vista
Windows XP
 

View All Microsoft Windowsce Embedded Posts  Ask A New Question 

Memory Leak in WM application ?? - RahulPShukl

Monday, June 09, 2008 8:44 AM

Hello Experts,

In my application (WinCE\WM\Pocket PC based) I am getting a severe memory
leak. I am nowhere allocating memory dynamically (no use of new/delete or
malloc/free). Application is in DLL form. So when ever I am invoking that DLL
and running the application, it leaves some memory behind. And if I run the
application in loops, it keeps consuming memory.
There are some points I would like to clear:

1. I have heard in one blog that use of CString variable can cause of memory
leak, though used as a local variable. Is it true??
2. If a CString variable is globally defined as static, so after coming out
from DLL, will the memory allocated to it destroyed?? Or I need to handle it
explicitly, how??
3. What are the tools which I can use to detect memory leak?
reply
 

I tried to detect the leak via Application verifier, but not able to - RahulPShukl

Monday, June 09, 2008 9:06 AM

I tried to detect the leak via Application verifier, but not able to
understand the log generated by that.

any other tool, which can reach me to the buggy code ???

- Rahul
reply

3. Entrek TOOLBOX should be able to do it. - Paul G. Tobey [eMVP]

Monday, June 09, 2008 11:10 AM

3. Entrek TOOLBOX should be able to do it.  It's a high-level tool that will
show you a log of unfreed allocations and allow you to click on one, opening
the corresponding source code.  At a guess, though, you should look for
*handles* that you've allocated and not freed.  I almost never have a
problem with actual dynamic memory allocation because I know that I have to
be careful about freeing them.  Handles, however, don't invoke that same
care.  You might also check any API calls that return you an array of
information, as you're almost certainly responsible for freeing that.

Paul T.
reply
 
 

Previous Microsoft Windowsce Embedded conversation.