bugGNU Octave - Bugs: bug #58041, 'clear all' produces error in...

 
 

bug #58041: 'clear all' produces error in handle class delete method accessing private property

Submitted by:  None
Submitted on:  Tue 24 Mar 2020 08:25:42 PM UTC  
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error
Status:  Works For Me Assigned to:  None
Originator Name:  Torsten Schorr Originator Email:  -email is unavailable-
Open/Closed:  Closed Release:  5.2.0
Operating System:  GNU/Linux

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 08 May 2020 07:35:45 PM UTC, comment #2: 

Same, unable to reproduce.

Mike Miller <mtmiller>
Project Administrator
Sat 28 Mar 2020 06:30:08 PM UTC, comment #1: 

This works fine for me with version 5.2.0 and the stable branch which will become 6.1.

You might try starting octave with the '-f' argument to skip reading any user initialization files and see if that makes a difference.  It could be something specific to your setup.

Rik <rik5>
Project Administrator
Tue 24 Mar 2020 08:25:42 PM UTC, original submission:  

The class definition

classdef myclass < handle
  properties (Access = private)
    iID
  end
  methods
    function self = myclass
      self.iID = 0;
    end
    function delete(obj)
      disp(obj.iID)
    end
  end
end

produces error on 'clear all':

x = myclass
x =

<object myclass>

>> clear all
>> warning: error caught while executing handle class delete method:
subsref: property `iID' has private access and cannot be obtained in this context

'clear x' works as expected.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

     

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-05-08 mtmiller Open/ClosedOpen => Closed
    2020-03-28 rik5 StatusNone => Works For Me

    Back to the top


    Powered by Savane 3.5