Click here to Skip to main content
15,889,406 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How: each doc/view in own thread (advanced) Pin
#realJSOP17-Jul-01 1:53
mve#realJSOP17-Jul-01 1:53 
GeneralRe: How: each doc/view in own thread (advanced) Pin
Stephen C. Steel13-Jul-01 13:11
Stephen C. Steel13-Jul-01 13:11 
GeneralCOleDateTime Pin
12-Jul-01 23:19
suss12-Jul-01 23:19 
GeneralRe: COleDateTime Pin
markkuk13-Jul-01 8:12
markkuk13-Jul-01 8:12 
GeneralGetting parts of the Platform SDK Pin
12-Jul-01 23:15
suss12-Jul-01 23:15 
GeneralRe: Getting parts of the Platform SDK Pin
EiSl12-Jul-01 23:40
EiSl12-Jul-01 23:40 
GeneralStrange implementation in one of the samples... Pin
EiSl12-Jul-01 23:12
EiSl12-Jul-01 23:12 
GeneralCPropertySheet::RemovePage in MFC causes memory leak Pin
Serge Desmedt12-Jul-01 23:11
professionalSerge Desmedt12-Jul-01 23:11 
Hi,


In an application we've written we have a dialog based MFC application
based on the CPropertySheet class. We are dynamically adding and
removing pages while the the dialog is displayed.

If the property pages we're adding and removing contain controls (i've
tried it with buttons and treecontrols), then we have a memory leak:
when I constantly add and remove pages, thus always returning to a
same initial state, the application consumes more and more memory.

It has nothing to do with the CPropertyPage derived objects
themselves. I added several integer members to them, to make the
memoryfootprint of the object bigger, but this doesn't cause the
memory leak to be bigger. However, when I fill the dialog (by using
the dialog editor of visual studio 6.0) with a lot of buttons, then
the memory leak is getting bigger. I've added no functionality to the
buttons, and not to the CPropertyPage derived class, except for one
button with which I can add and remove pages to the CPropertySheet
derived dailogbox. Thus it looks like MFC doesn't destroy the dialog
template, or the controls on it. The page we're removing is NOT the
active page. I've tried explicitly callling destroywindow on the
propertypage that gets removed but this does not work neither.

The only functionality the application has, is adding and removing
CPropertyPage derived objects, so the memoryleak can not be caused by
anything else.

Does anyone have an idea what can be wrong and how to solve it Confused | :confused:


Thanks,

Serge Desmedt
GeneralRe: CPropertySheet::RemovePage in MFC causes memory leak Pin
Tomasz Sowinski13-Jul-01 0:00
Tomasz Sowinski13-Jul-01 0:00 
GeneralRe: CPropertySheet::RemovePage in MFC causes memory leak Pin
Serge Desmedt13-Jul-01 5:33
professionalSerge Desmedt13-Jul-01 5:33 
GeneralSaving HICON to a file Pin
Deian12-Jul-01 22:45
Deian12-Jul-01 22:45 
GeneralWhy not delete the CSingleDocTemplate Pin
ndkk12-Jul-01 22:01
ndkk12-Jul-01 22:01 
GeneralProblem in RegQueryValueEx Pin
Yamuna12-Jul-01 21:35
Yamuna12-Jul-01 21:35 
GeneralByteBuffer Pin
12-Jul-01 21:12
suss12-Jul-01 21:12 
GeneralRe: ByteBuffer Pin
Tomasz Sowinski13-Jul-01 0:20
Tomasz Sowinski13-Jul-01 0:20 
GeneralScrollview & Zoom Pin
12-Jul-01 20:14
suss12-Jul-01 20:14 
GeneralRe: Scrollview & Zoom Pin
Tomasz Sowinski13-Jul-01 0:14
Tomasz Sowinski13-Jul-01 0:14 
GeneralCaller ID Pin
Vishnu Vijayan12-Jul-01 20:01
Vishnu Vijayan12-Jul-01 20:01 
GeneralRe: Caller ID Pin
Michael P Butler12-Jul-01 22:49
Michael P Butler12-Jul-01 22:49 
GeneralTray Icon Pin
vijayaramaraju12-Jul-01 18:52
vijayaramaraju12-Jul-01 18:52 
GeneralRe: Tray Icon Pin
Michael Dunn12-Jul-01 19:18
sitebuilderMichael Dunn12-Jul-01 19:18 
GeneralCOleCurrency Pin
otvac12-Jul-01 15:01
otvac12-Jul-01 15:01 
GeneralRe: COleCurrency Pin
Tomasz Sowinski13-Jul-01 0:11
Tomasz Sowinski13-Jul-01 0:11 
GeneralPointer to CListCtrl Pin
Frank Deo12-Jul-01 13:59
Frank Deo12-Jul-01 13:59 
Generaltransparent static control problems Pin
stephen.hazel12-Jul-01 12:35
stephen.hazel12-Jul-01 12:35 

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.