engine/savable.cpp memory leak?
djszapi at archlinux.us
Sat May 7 15:21:46 CEST 2011
On Sat, May 7, 2011 at 11:48 AM, Dan Leinir Turthra Jensen
<admin at leinir.dk> wrote:
> On Saturday 07 May 2011 02:22:37 Diego Giagio wrote:
>> It appears engine/savable.cpp has a memory leak on line 68-73:
>> QFile* savableFile = new QFile( file.toLocalFile() );
>> if( !savableFile->open( QIODevice::WriteOnly ) )
>> DEBUG_TEXT( QString( "Could not write to file %1" ).arg(
>> object->property( "file" ).value<QUrl>().toString() ) )
>> return false;
>> Perhaps using QScopedPointer in this case is a good idea (and removing
>> delete statement on line 79). Or add a delete statement before return.
> Well spotted - i'll get right on that :)
No need, it has been already fixed!
More information about the Gluon