Skip to content

Conversation

@alcantara09
Copy link

No description provided.

@alcantara09 alcantara09 requested a review from elael January 16, 2019 12:42
Vizkit3DWidget::~Vizkit3DWidget()
{
delete env_plugin;
env_plugin = NULL;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since you're using C++ >= 11, use nullptr instead of NULL.

@doudou
Copy link

doudou commented Jan 16, 2019

Vizkit3DWidget sets its plugin parent (as QObject parent) to itself here: https://github.com/rock-core/gui-vizkit3d/blob/master/src/Vizkit3DWidget.cpp#L751

Qt will therefore delete the plugin when their parent (the vizkit3dWidget) gets deleted, and this is not needed.

@doudou
Copy link

doudou commented Jan 16, 2019

Since there is a difference in behavior between explicit deletion and letting-Qt-doing-it, there's something else that's fishy. Let's leave this PR open until we figure out what it is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants