Memory Tracking
-
instead). Again the memory usage still rises (by about 4KB mind you [if the task manager can be believed... most of my memory allocation is of the single MAX_PATH and _MAX_FNAME chunks). Now thinking it could be from pass by value allocation I made sure and passed all my buffers by reference and yet it still rises. (eg MessageBox(MainWindow,(char*)&buffer,"cannot open item",0);) My last shot in the dark is maybe MessageBox is creating the leak by when clicking OK the message box is not freed by Windows or something. I know that's a stretch but I can't think of anything else. Are there any tools out there that I can use to determine where memory is being allocated and find possible leaks? (mind you I'm using char*'s and straight Win32SDK (aka no mfc)). Can anyone suggest what I can look for next? :confused: This is driving me absolutely batty. :mad: Sean
-
instead). Again the memory usage still rises (by about 4KB mind you [if the task manager can be believed... most of my memory allocation is of the single MAX_PATH and _MAX_FNAME chunks). Now thinking it could be from pass by value allocation I made sure and passed all my buffers by reference and yet it still rises. (eg MessageBox(MainWindow,(char*)&buffer,"cannot open item",0);) My last shot in the dark is maybe MessageBox is creating the leak by when clicking OK the message box is not freed by Windows or something. I know that's a stretch but I can't think of anything else. Are there any tools out there that I can use to determine where memory is being allocated and find possible leaks? (mind you I'm using char*'s and straight Win32SDK (aka no mfc)). Can anyone suggest what I can look for next? :confused: This is driving me absolutely batty. :mad: Sean
grab a 14 day trial of Purify . it will spot most leaks in your app. -c
Being just contaminates the void.
--Robyn HitchcockImage Processing - easy, like Sunday morning.
-
grab a 14 day trial of Purify . it will spot most leaks in your app. -c
Being just contaminates the void.
--Robyn HitchcockImage Processing - easy, like Sunday morning.
Well I did that and it stated I had no leaks in the application. Maybe I'm just trusting the Task Manager when I shouldn't be. Sean
-
Well I did that and it stated I had no leaks in the application. Maybe I'm just trusting the Task Manager when I shouldn't be. Sean
if you're on NT/2K/XP, you can try calling _heapmin somewhere in your app. sometimes that will force the OS to minimize your app's heap (really free'ing memory you think you've already free'd, but which the OS hasn't given back to the general pool). sometimes it has no effect at all... -c
Being just contaminates the void.
--Robyn HitchcockImage Processing - easy, like Sunday morning.