[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #53844] handle class: delete destructor method
From: |
Mike Miller |
Subject: |
[Octave-bug-tracker] [bug #53844] handle class: delete destructor method cannot access class properties |
Date: |
Fri, 11 May 2018 18:54:38 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0 |
Follow-up Comment #5, bug #53844 (project octave):
Ok, here is the strange case that I am now running into. Consider the
following toy class
classdef dummy < handle
properties
id
endproperties
methods
function self = dummy (id)
if (nargin < 1)
id = 'dummy';
endif
self.id = id;
endfunction
function delete (self)
fprintf (stderr, '');
endfunction
function r = isa (self, klass)
r = isequal (self.id, klass);
endfunction
endmethods
endclassdef
Now the following code at the interpreter prompt shows the problem
>> x = dummy;
>> isa (x, 'dummy')
ans = 1
>> isa (dummy, 'dummy')
>>
Notice how the second call to 'isa' returns nothing at all.
If the delete method is removed, or if the method stays but the entire
function body is deleted or commented out, then this behaves as it should. But
if the destructor does *something*, then the method on the transient value
returns nothing.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?53844>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #53844] handle class: delete destructor method cannot access class properties, anonymous, 2018/05/05
- [Octave-bug-tracker] [bug #53844] handle class: delete destructor method cannot access class properties, Rik, 2018/05/05
- [Octave-bug-tracker] [bug #53844] handle class: delete destructor method cannot access class properties, Mike Miller, 2018/05/09
- [Octave-bug-tracker] [bug #53844] handle class: delete destructor method cannot access class properties, John W. Eaton, 2018/05/11
- [Octave-bug-tracker] [bug #53844] handle class: delete destructor method cannot access class properties, Mike Miller, 2018/05/11
- [Octave-bug-tracker] [bug #53844] handle class: delete destructor method cannot access class properties,
Mike Miller <=
- [Octave-bug-tracker] [bug #53844] handle class: delete destructor method cannot access class properties, Mike Miller, 2018/05/11
- [Octave-bug-tracker] [bug #53844] handle class: delete destructor method cannot access class properties, Rik, 2018/05/11
- [Octave-bug-tracker] [bug #53844] handle class: delete destructor method cannot access class properties, Mike Miller, 2018/05/11
- [Octave-bug-tracker] [bug #53844] handle class: delete destructor method cannot access class properties, John W. Eaton, 2018/05/12
- [Octave-bug-tracker] [bug #53844] handle class: delete destructor method cannot access class properties, John W. Eaton, 2018/05/13
- [Octave-bug-tracker] [bug #53844] handle class: delete destructor method cannot access class properties, John W. Eaton, 2018/05/13
- [Octave-bug-tracker] [bug #53844] handle class: delete destructor method cannot access class properties, John W. Eaton, 2018/05/14
- [Octave-bug-tracker] [bug #53844] handle class: delete destructor method cannot access class properties, Mike Miller, 2018/05/14
- [Octave-bug-tracker] [bug #53844] handle class: delete destructor method cannot access class properties, Mike Miller, 2018/05/14
- [Octave-bug-tracker] [bug #53844] handle class: delete destructor method cannot access class properties, John W. Eaton, 2018/05/14