mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
AppFwk: Improved the message when forgetting to delete a child object
This commit is contained in:
parent
43249f7af8
commit
8004e766ea
@ -52,7 +52,8 @@ caf::PdmChildField<DataType*>::PdmChildField(const DataTypePtr& fieldValue)
|
||||
template<typename DataType >
|
||||
caf::PdmChildField<DataType*>::~PdmChildField()
|
||||
{
|
||||
assert(m_fieldValue.isNull());
|
||||
bool The_object_owned_by_the_child_field_is_deleted = m_fieldValue.isNull();
|
||||
assert(The_object_owned_by_the_child_field_is_deleted); // Did you forget ?
|
||||
|
||||
if (!m_fieldValue.isNull()) m_fieldValue.rawPtr()->removeAsParentField(this);
|
||||
m_fieldValue.setRawPtr(NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user