engine/savable.cpp memory leak?

Dan Leinir Turthra Jensen admin at leinir.dk
Sat May 7 15:26:38 CEST 2011


On Saturday 07 May 2011 14:21:46 Laszlo Papp wrote:
> Hi
> 
> 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:
> >> Hi,
> >> 
> >> 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!

  Yeah, i noticed that, thanks :)

-- 
..Dan // Leinir..
http://leinir.dk/

                          Co-
                            existence
                          or no
                            existence

                          - Piet Hein


More information about the Gluon mailing list