octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Another request for classdef test in Matlab


From: Michael Goffioul
Subject: Re: Another request for classdef test in Matlab
Date: Sat, 5 Jan 2013 18:48:35 -0500

On Sat, Jan 5, 2013 at 6:44 PM, Michael D. Godfrey <address@hidden> wrote:
On 01/05/2013 06:40 PM, Michael Goffioul wrote:
With the class definition above (with handle as superclass), run the following instead:

a(2,2) = ClassA(2)
b = a
a(1,1).x, b(1,1).x
a(1,1) = ClassA(3)
a(1,1).x, b(1,1).x
Do I have to do something other than run the script to have "handle as superclass"?

No, that's fine, thanks. What I wanted to check is, when you have an array of objects whose class is a handle class, is the array also shared and behave like a handle class. It appears it does not. If you assign another object in array 'a', array 'b' does not change. So an array of handle-class objects behaves like a value-class object.

Michael.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]