|
| From: | Piotr Held |
| Subject: | [Octave-bug-tracker] [bug #46497] classdef: delete destructor method is not called when clearing handle class |
| Date: | Thu, 2 Nov 2017 14:14:33 -0400 (EDT) |
| User-agent: | Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.78 Safari/537.36 |
Follow-up Comment #2, bug #46497 (project octave):
And I tested it as extensively as I could with no side effects.
The destructor is called only when clearing an object that inherits from
handle and not when a classdef does not inherit from handle.
The way I arrived at this solution was to turn on DEBUG_TRACES in
ov-classdef.cc and then I found the location where the handle_cdef_object
destructor is called. That's where I added the cdef_class::delete_object()
function which calls the classdef "delete()" method.
I also wrote a tests for the problem.
The patch filename is:
patch_classdef_destructor_bug46497.diff
(file #42322)
_______________________________________________________
Additional Item Attachment:
File name: patch_classdef_destructor_bug46497.diff Size:3 KB
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?46497>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
| [Prev in Thread] | Current Thread | [Next in Thread] |