Click here to Skip to main content
11,703,438 members (70,478 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: MFC clipboard
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 Frown | :( Any pointers would really be helpful.

Thanks in advance!!!
Posted 19-Aug-12 6:50am

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

  Print Answers RSS
0 Maciej Los 540
1 Sergey Alexandrovich Kryukov 400
2 OriginalGriff 340
3 Andy Lanng 124
4 Matt T Heffron 115
0 OriginalGriff 8,519
1 Sergey Alexandrovich Kryukov 7,667
2 CPallini 4,987
3 Maciej Los 4,686
4 Mika Wendelius 3,566


Advertise | Privacy | Mobile
Web02 | 2.8.150819.1 | Last Updated 19 Aug 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100