Memory leak in server application without traceing to debug

L

liangrf

My server app is transformed from environment of UNIX to Windows. Its
ran on the Apache Windows Server. The code is compiled pass by MSVC6
and ran well. but it has more memory leak.
when I am debugging the code with windbg, insertting mang break, and
step by step running code, the app do not appare memory leak at all. I
am confused.
if the app run without debugging, then the memory would increse by
watching task manager.

I think whether the app runs faster so that it dont duly free memory ?!
:) But I dont way to test.
Someone encounter similarity problem. Please give me some help.

THX.
 
J

John Harrison

My server app is transformed from environment of UNIX to Windows. Its
ran on the Apache Windows Server. The code is compiled pass by MSVC6
and ran well. but it has more memory leak.
when I am debugging the code with windbg, insertting mang break, and
step by step running code, the app do not appare memory leak at all. I
am confused.
if the app run without debugging, then the memory would increse by
watching task manager.

I think whether the app runs faster so that it dont duly free memory ?!
:) But I dont way to test.
Someone encounter similarity problem. Please give me some help.

THX.

Often there are bugs which only show themselves in release mode, in
debug mode there is no bug. Usually this is because of uninitialised
variables. Look for those.

Try debugging the release version of the program by logging all attempts
to allocate and free memory. Try writing your own allocation routines to
help do this. Use a bit of imagination to find the bug instead of
relying on tools to do it for you.

john
 
L

liangrf

Thx, I am glad about u wrote back my question.
I am trying it again with imagination. :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,165
Latest member
JavierBrak
Top