help-octave
[Top][All Lists]
Advanced

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

octave derived classes - a couple of questions


From: Paul Thomas
Subject: octave derived classes - a couple of questions
Date: Fri, 12 Mar 2004 18:07:56 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225

I have been asking around about destructors and octave classes. I couldn't get a satisafactory answer, so here are the questions for the list:

(i) Why do the derived classes at the bottom of the inheritance tree, like Matrix or ColumnVector, not have destructors?

(ii) The following compiles and doesn't obviously cause any runtime problems:

Matrix x( irow, icol );
......
delete [] &x ( 0 , 0 );

Is this accomplishing deallocation of the space allocated to x, or does it cause memory leakage?

If these seem trivial to you, please excuse me, I am still something of a C++ tyro.


Paul T



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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