English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

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: 2006-08-24 (16:49)
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.


Bardur Arantsson

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