Click here to Skip to main content
15,887,596 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I am using function IRichEditOle::GetClipboardData(CHARRANGE *lpchrg, DWORD reco,LPDATAOBJECT *lplpdataobj) to retrieve a clipboard object for a range in edit control. At this step whenever image is retrieved for the range, I could see an increase of 12MB memory for my application (No matter what type & size of image I am retrieving). After doing all my job with the LPDATAOBJECT *, I call Release() on that pointer which decreases the memory by 4MB always. So every step is causing 12MB(acquired) - 4MB(released) = 8MB of memory leak for my application.

Also I have noticed that if I use QueryInterface(...) method instead of GetClipboardData(...)there is absolutely no issues in memory. But then there are some other reasons because of which I have to have GetClipboardData(...) do my job.

I am unable to understand what else is required by me to release the memory acquired or Is it actually a GetClipboardData(...) failure and we can't do anything about it :(. Any pointers would really be helpful.

Thanks in advance!!!
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900