|
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 allI 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@hiddenMotorola 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
[Prev in Thread] | Current Thread | [Next in Thread] |