Memory leak when using zNotebook and zWizard dialogs

Article ID: 882
Last updated: 05 Feb, 2008
Article ID: 882
Last updated: 05 Feb, 2008
Revision: 1
Views: 2751
Posted: 25 Nov, 1997
by Dean J.
Updated: 05 Feb, 2008
by Dean J.
Problem


When implementing either a zNotebook or a zWizard dialog, a slight memory leak occurs at run time.


Cause


A font is not being deleted in the destructor.


Action


To correct this problem, do the following:
  1. Go to window.cpp.

  2. Look for the following line at the very bottom of the zWindow destructor:
    //  if (_font!=0 && (delFlags&ZWINDOW_FONT_OWNER)) delete _font;
  3. Uncomment this line and the memory leak will no longer occur.
This article was:   Helpful | Not helpful
Report an issue
Article ID: 882
Last updated: 05 Feb, 2008
Revision: 1
Views: 2751
Posted: 25 Nov, 1997 by Dean J.
Updated: 05 Feb, 2008 by Dean J.

Others in this category