[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: memory management in ocf-files
From: |
Jordi Gutiérrez Hermoso |
Subject: |
Re: memory management in ocf-files |
Date: |
Mon, 1 Oct 2012 10:22:43 -0400 |
On 1 October 2012 10:03, Jose <address@hidden> wrote:
>> Octave uses COWs:
>>
>> http://en.wikipedia.org/wiki/Copy_on_write
>>
>> If you pass data into an Octave class (e.g. Array, Matrix, any member
>> of the octave_value hierarchy), then it expects to own the data and do
>> its own copying and cleanup.
>
>
> ... and this cleanup also cleans the original octave_value objects that I
> created in C++ and passed to octave through an oct-file, right? Just to be
> sure that I understood you 100%.
Yes, of course.
> What happens with those objects that I create in C++ and are not passed to
> octave?
Well, Octave isn't running all of your code in a modified
garbage-collected environment. You still have to manage the memory
that Octave knows nothing about.
>> Do note your GPL obligations regarding Octave:
>>
>> http://wiki.octave.org/FAQ#Licensing_issues
>
>
> Just to be sure about your point: in short, you are reminding me that
> whatever oct-file we create, it must be released under a GPL-compatible
> license, right?
Roughly, yes. If you distribute it, etc.
- Jordi G. H.