help-octave
[Top][All Lists]
Advanced

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

Octave - Destructor method


From: Werner Koenig
Subject: Octave - Destructor method
Date: Fri, 30 Aug 2013 19:38:34 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.28) Gecko/20120306 Thunderbird/3.1.20

Hello List,

is there a possibility to build a destructor method for a class in Octave.

The purpose is following:
----------------------------------
I have an object instantiated from a class. One member of this
object is a file-handle, which belongs to an open stream. Now
I want to flush and close the stream just before the object is
cleared. Of course, I can close the stream manualy before I clear the
object. But this way isn't professional, because I can forget to
close the stream and when I exit Octave with an open stream the system
closed the stream, but perhaps I loose some value data. So the way
with a destructor-method is much better.

So long Wener

returns please to address@hidden


reply via email to

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