Login  Register

Object not deleted in main/qc_applicationwindow.cpp

Posted by ClaudeQC on Jul 24, 2011; 12:43pm
URL: https://forum.librecad.org/Object-not-deleted-in-main-qc-applicationwindow-cpp-tp4627858.html


Hello,

- In main/qc_applicationwindow.cpp, in the following function:
        slotFileExport( const QString& name, const QString& format,
                        QSize size, bool black, bool bw)

  The "painter" object is not deleted at the end of the export process.
 
- Code look like below:

    // GraphicView deletes painter
    painter->end();
    delete buffer;

- Should it be like:

    // GraphicView deletes painter
    painter->end();
    delete painter;
    delete buffer;


Claude