mirror of https://github.com/KLayout/klayout.git
Candidate for fix.
This commit is contained in:
parent
6365ddfe82
commit
beec19951d
|
|
@ -306,7 +306,11 @@ PYAObjectBase::detach ()
|
|||
}
|
||||
}
|
||||
|
||||
detach_callbacks ();
|
||||
// NOTE: m_owned = false might mean the C++ object is already destroyed. We must not
|
||||
// modify in this case and without is_managed() there is no way of knowing the state.
|
||||
if (m_owned) {
|
||||
detach_callbacks ();
|
||||
}
|
||||
|
||||
m_obj = 0;
|
||||
m_const_ref = false;
|
||||
|
|
|
|||
|
|
@ -402,7 +402,11 @@ Proxy::detach ()
|
|||
}
|
||||
}
|
||||
|
||||
clear_callbacks ();
|
||||
// NOTE: m_owned = false might mean the C++ object is already destroyed. We must not
|
||||
// modify in this case and without is_managed() there is no way of knowing the state.
|
||||
if (m_owned) {
|
||||
clear_callbacks ();
|
||||
}
|
||||
|
||||
m_self = Qnil;
|
||||
m_obj = 0;
|
||||
|
|
|
|||
|
|
@ -1402,6 +1402,12 @@ class Basic_TestClass < TestBase
|
|||
a._manage
|
||||
end
|
||||
|
||||
# Looks like Ruby is keeping the last A instance in some kind of cache:
|
||||
# this will release it
|
||||
a = RBA::A.new
|
||||
a._destroy
|
||||
a = nil
|
||||
|
||||
# makes sure the objects inside the block before are deleted
|
||||
GC.start
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue