explicitly destroy NodeParams in Node destructor
NodeParams used to be destroyed automatically through the QObject system, but now that NodeParams perform actions that access the parent Node object in their destructor, the NodeParam destructor needs to be called before the Node has been fully destroyed. By destroying explicitly in the Node destructor we accomplish this.
This commit is contained in:
@@ -28,6 +28,15 @@ Node::Node() :
|
||||
{
|
||||
}
|
||||
|
||||
Node::~Node()
|
||||
{
|
||||
// We delete in the Node destructor rather than relying on the QObject system because the parameter may need to
|
||||
// perform actions on this Node object and we want them to be done before the Node object is fully destroyed
|
||||
foreach (NodeParam* param, params_) {
|
||||
delete param;
|
||||
}
|
||||
}
|
||||
|
||||
QString Node::Category()
|
||||
{
|
||||
// Return an empty category for any nodes that don't use one
|
||||
@@ -234,6 +243,11 @@ bool Node::IsBlock()
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Node::IsTrack()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
rational Node::LastProcessedTime()
|
||||
{
|
||||
rational t;
|
||||
|
||||
Reference in New Issue
Block a user