2010/2/2 Brent Pedersen <[email protected]>:
> On Thu, Jan 28, 2010 at 7:34 PM, Danilo Freitas <[email protected]> wrote:
>> As you know, Robert is planning to put the work about C++ Support in
>> next release. So, we have some new stuff, and people need to learn it.
>>
>> I wrote a very simple tutorial on wiki [0], with some examples. I
>> think it's easy to learn (and use) it.
>>
>> So, if you have any questions about it, just ask here.
>>
>> [0] http://wiki.cython.org/gsoc09/daniloaf/progress
>>
>> --
>> - Danilo Freitas
>> _______________________________________________
>> Cython-dev mailing list
>> [email protected]
>> http://codespeak.net/mailman/listinfo/cython-dev
>>
>
> hi, i'm interested in using the STL vector and hash_map stuff, i found this:
> http://hg.cython.org/gsoc-danilo/file/a076c2505c5e/tests/run/cpp_stl_vector.pyx
>
> in my uninformed opinion, it'd be nice to have a couple quick examples
> in your tutorial.

Hi. I'm working on better examples. I'll soon update the wiki with them.

> is the "del v" in the finally block that appears in all the test cases
> necessary?

When creating a pointer object with 'new', it's heap allocated. So, we
need to remove it to free memory. It's like C++, for example:

class Foo
{
    ...
};

int main()
{
    Foo *foo = new Foo();
    ...
    delete foo;
    return 0;
}

It's very important use it when you won't use that object again, or
you'll have memory leak. It's like malloc and free in C.


-- 
- Danilo Freitas
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to