|
-
November 16th, 2005, 09:26 AM
#1
Memory Freeing Problem
I'm creating a stream object stored in global memory.
GetImage() function
IStream *pStream;
::CreateStreamOnHGlobal(NULL,TRUE,&pStream);
image->Save(pStream,&encoderClsid,&encoderParameters);
..// bit operations no memory allocations just math calcuations
//then
delete image;
pStream->Release();
the problem i have when application is run ,and begin executing the GetImage
Function, the memory is keep increase after each call and nothing is freed,
what should i do to free memory after each call the two statements :
delete image;
pStream->Release(); as they have to effects
I also tried to use GlobalFree(pStream), and GlobalFree(&pStream) with no
avail. memory keep rasing after each call
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|