-
Notifications
You must be signed in to change notification settings - Fork 936
Closed
Description
Currently, if you aren't careful, it's really easy to leak memory with FlowScene. ~FlowScene() isn't called by default. You have to write scene->setParent(parentWidget), otherwise it's not automatically deleted.
A possible fix would be to modify the constructor of FlowScene to something like this:
FlowScene(std::shared_ptr<DataModelRegistry> registry =
std::make_shared<DataModelRegistry>(),
QWidget* parent = nullptr);FlowScene::
FlowScene(std::shared_ptr<DataModelRegistry> registry, QWidget* parent)
: _registry(registry)
{
setItemIndexMethod(QGraphicsScene::NoIndex);
setParent(parent);
}Metadata
Metadata
Assignees
Labels
No labels