Click here to Skip to main content
11,575,925 members (59,169 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 Sergey Alexandrovich Kryukov 350
1 Dave Kreskowiak 160
2 F-ES Sitecore 145
3 OriginalGriff 125
4 Abhinav S 98
0 OriginalGriff 705
1 Sergey Alexandrovich Kryukov 600
2 Abhinav S 438
3 F-ES Sitecore 410
4 Suvendu Shekhar Giri 365


Advertise | Privacy | Mobile
Web03 | 2.8.150603.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