[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #55758] classdef: delete method causes tempora
From: |
Mike Miller |
Subject: |
[Octave-bug-tracker] [bug #55758] classdef: delete method causes temporaries to be deleted before use |
Date: |
Mon, 8 Apr 2019 23:12:38 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.86 Safari/537.36 |
Follow-up Comment #3, bug #55758 (project octave):
Ok, may be an issue in my code, this might be fixed. You can close it as fixed
if you want and I can come back later if there is still a problem. It will
take a little refactoring.
Basically, I have a constructor that depends on values initialized in C++
code. The C++ function returns a second instance of the object, which
overwrites the original.
classdef myobject < handle
methods
function obj = myobject (value, id)
if (nargin == 1)
obj = __helper_function__ (value);
else
obj.id = id;
endif
…
This created two instances of the object, and when the first one was deleted,
it hadn't been fully constructed, so it looked like properties of the object
were missing. I'll rewrite all of this so a second instance of the object
doesn't need to be created.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?55758>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/