Click here to Skip to main content
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 OriginalGriff 383
1 Richard Deeming 180
2 Sergey Alexandrovich Kryukov 171
3 Yogesh Kumar Tyagi 165
4 ChauhanAjay 156
0 Sergey Alexandrovich Kryukov 6,252
1 OriginalGriff 5,498
2 CPallini 2,473
3 Richard MacCutchan 1,627
4 Abhinav S 1,530


Advertise | Privacy | Mobile
Web03 | 2.8.140814.1 | Last Updated 19 Aug 2012
Copyright © CodeProject, 1999-2014
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