Object not deleted in main/qc_applicationwindow.cpp
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.
Re: Object not deleted in main/qc_applicationwindow.cpp
On 24/07/2011 09:15, R. van Twisk [via LibreCAD] wrote:
> Claude,
>
> what if we just do it like this??
> This way we don't have to worry about deleting the painter at all.
>
Hello Ries,
- I don't like creating objects in the stack.
Prefer to create them in the heap memory (with new).
- I don't know RS_PainterQt class.
If this class is not too big in term of data memory usage, it may be
acceptable to create associated objects in the stack.
Re: Object not deleted in main/qc_applicationwindow.cpp
On 24/07/2011 13:54, R. van Twisk [via LibreCAD] wrote:
>
>
> I just asked this question on the IRC channel and they mentioned 'stack' :)
>
> For this case, I think I need to agree with that. The QPainter is just used in
> that function and doesn't use any memory anyways.
>
- Ok.
- Given your explanation, I agreed with you to create these objects
from the stack.