Changeset 11906

Show
Ignore:
Timestamp:
11/09/10 16:48:46 (4 years ago)
Author:
robert
Message:

From Wang Rui with small tweak from Robert Osfield, fix of memory leak in gif plugin when using GifImageStream?

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osgPlugins/gif/ReaderWriterGIF.cpp

    r11511 r11906  
    547547    while (recordtype != TERMINATE_RECORD_TYPE); 
    548548 
     549    // Delete the last allocated buffer to avoid memory leaks if we using GifImageStream 
     550    if ( obj && *obj ) 
     551        delete [] buffer; 
     552 
    549553    delete [] rowdata; 
    550554    *width_ret = giffile->SWidth;