Click here to Skip to main content
15,915,850 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: While terminating application a error is displayed.... Pin
Nish Nishant10-Jun-02 21:42
sitebuilderNish Nishant10-Jun-02 21:42 
GeneralRe: While terminating application a error is displayed.... Pin
newneo11-Jun-02 0:39
newneo11-Jun-02 0:39 
GeneralRe: While terminating application a error is displayed.... Pin
Rama Krishna Vavilala11-Jun-02 1:02
Rama Krishna Vavilala11-Jun-02 1:02 
GeneralHelp - C++ and Skinnable Pin
kulwen10-Jun-02 17:20
kulwen10-Jun-02 17:20 
GeneralRe: Help - C++ and Skinnable Pin
Christian Graus10-Jun-02 17:35
protectorChristian Graus10-Jun-02 17:35 
General"unplug or eject hardware" in application Pin
Eric Lee10-Jun-02 16:46
Eric Lee10-Jun-02 16:46 
GeneralWH_CBT and menus Pin
Roman Nurik10-Jun-02 15:47
Roman Nurik10-Jun-02 15:47 
GeneralMemory Leak due to Memory context Pin
moswal10-Jun-02 15:32
moswal10-Jun-02 15:32 
My application has a serious memory leak problem. It is because I am not able to release the memory consumed by the memory context. In general I save an image in 2 memory context variables. One is used to hold latest data and the other one holds previous data(used for undo purpose). I process the image in the memory context and after processing i display it on the device context. I am reusing the same memory context variables for processing the image.

But i believe reusing of memory context causes memory leaks therefore i thought I would the image information in an array. I will process that array and save in the memory context and then display it on the device context. But in order to do this I tried the following ways to release the memory consumed by the memory context.
1) memDC.SelectObject(oldbmp);
2) ReleaseDC(memDC);
3) memDC.DeleteDC();
But i am still facing the memory leak problem. Please confirm if reusing memory context is possible and how to release the memory consumed by the memory context.

Thanx in advance.



Einstein's Assistant
GeneralRe: Memory Leak due to Memory context Pin
Christian Graus10-Jun-02 16:57
protectorChristian Graus10-Jun-02 16:57 
GeneralRe: Memory Leak due to Memory context Pin
moswal10-Jun-02 23:00
moswal10-Jun-02 23:00 
GeneralRe: Memory Leak due to Memory context Pin
Christian Graus10-Jun-02 23:14
protectorChristian Graus10-Jun-02 23:14 
GeneralRe: Memory Leak due to Memory context Pin
moswal10-Jun-02 23:46
moswal10-Jun-02 23:46 
GeneralRe: Memory Leak due to Memory context Pin
Christian Graus10-Jun-02 23:50
protectorChristian Graus10-Jun-02 23:50 
GeneralRe: Memory Leak due to Memory context Pin
moswal15-Jun-02 22:06
moswal15-Jun-02 22:06 
GeneralRe: Memory Leak due to Memory context Pin
Christian Graus15-Jun-02 23:27
protectorChristian Graus15-Jun-02 23:27 
GeneralRe: Memory Leak due to Memory context Pin
moswal27-Jun-02 22:49
moswal27-Jun-02 22:49 
GeneralVC.Net, const member functions, and more... Pin
Abin10-Jun-02 15:30
Abin10-Jun-02 15:30 
GeneralRe: VC.Net, const member functions, and more... Pin
Christian Graus10-Jun-02 16:46
protectorChristian Graus10-Jun-02 16:46 
Generalappliction freezing.. Pin
10-Jun-02 15:13
suss10-Jun-02 15:13 
GeneralRe: appliction freezing.. Pin
Roman Nurik10-Jun-02 15:47
Roman Nurik10-Jun-02 15:47 
GeneralRe: appliction freezing.. Pin
10-Jun-02 16:12
suss10-Jun-02 16:12 
GeneralRe: appliction freezing.. Pin
Le centriste11-Jun-02 3:40
Le centriste11-Jun-02 3:40 
GeneralImage transformations Pin
SuperGeek10-Jun-02 14:20
SuperGeek10-Jun-02 14:20 
GeneralRe: Image transformations Pin
moswal10-Jun-02 15:45
moswal10-Jun-02 15:45 
GeneralRe: Image transformations Pin
Christian Graus10-Jun-02 16:47
protectorChristian Graus10-Jun-02 16:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.