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: john.2.tomlinson
Subject: RE: Quick question about oct files and OCTAVE_LOCAL_BUFFER
Date: Fri, 29 Aug 2008 11:21:03 +0100

David

Sorry - yes I am using C++. So I will not worry about freeing the
memory.

Thanks for the very quick reply.

John T.


-----Original Message-----
From: David Bateman [mailto:address@hidden 
Sent: 29 August 2008 11:11
To: Tomlinson,J,John,DMJ R
Cc: address@hidden
Subject: Re: Quick question about oct files and OCTAVE_LOCAL_BUFFER

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]