Skip to content

Memory Leak in vsg::ref_ptr<vsg::Data> when using convertToVsg with osg::Image #84

@xiaoxin0214

Description

@xiaoxin0214

In the function vsg::ref_ptrvsg::Data convertToVsg(const osg::Image* image, bool mapRGBtoRGBAHint), if we simply return nullptr without performing any additional operations, no memory leak occurs:

vsg::ref_ptr<vsg::Data> convertToVsg(const osg::Image* image, bool mapRGBtoRGBAHint)
{
    return nullptr;
}

However, if we execute the conversion logic but still end up returning nullptr, a memory leak occurs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions