help-octave
[Top][All Lists]
Advanced

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

Re: Quick question about oct files and OCTAVE_LOCAL_BUFFER


From: David Bateman
Subject: Re: Quick question about oct files and OCTAVE_LOCAL_BUFFER
Date: Fri, 29 Aug 2008 12:11:21 +0200
User-agent: Thunderbird 2.0.0.16 (X11/20080725)

address@hidden wrote:

Hello all

I am working on some code that is written in 'C' and calling this code from Octave. Within the 'C' code I am allocating memory using OCTAVE_LOCAL_BUFFER. Can the group just confirm that I do not need to do anything to free this memory when the function finishes?

Sorry for the rather newbie question - I get a little nervous not freeing memory after programming 'C/C++' for 15 years.

John Tomlinson.
Ipswich, UK


In C++ it typically uses the std::vector<T> class for allocation of the memory and yes in C++ when the variable goes out of scope it will be deleted. However, in C you can't use OCTAVE_LOCAL_BUFFER. Do you mean you are using C++ and not C?

D.


--
David Bateman                                address@hidden
Motorola Labs - Paris +33 1 69 35 48 04 (Ph) Parc Les Algorithmes, Commune de St Aubin +33 6 72 01 06 33 (Mob) 91193 Gif-Sur-Yvette FRANCE +33 1 69 35 77 01 (Fax) The information contained in this communication has been classified as: [x] General Business Information [ ] Motorola Internal Use Only [ ] Motorola Confidential Proprietary



reply via email to

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