Version française
Home     About     Download     Resources     Contact us    
Browse thread
memory handling with native code
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Bardur Arantsson <spam@s...>
Subject: Re: memory handling with native code
Michael Wohlwend wrote:
> I'm trying to make an interface to a c++ lib of a friend of me, it's getting better, but questions about 
 > the memory management came up:
> Should I wrap the pointer in a custom object?
[-- snip mumble about unbroken lines ;) --]

Since we're on this subject: I was wondering whether anyone on the list 
has investigated if it's possible to use the C++ boost::shared_ptr<> or 
tr1::shared_ptr<> for that matter and OCaml's custom blocks to 
interoperate so that one can avoid having to do manual custom 
block/pointer management on the C/C++ side of things?

I've always found the manual custom block/pointer management to be one 
of the more annoying aspects of OCaml's FFI.

Cheers,

-- 
Bardur Arantsson
<bardurREMOVE@THISscientician.net>

- I didn't have a blunt object with me, so I said "OK".
                                  David Letterman, 'The Late Show'