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
[Caml-list] camlidl - finalizing cows without COM!
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-04-17 (10:54)
From: Jakob Lichtenberg <jl@i...>
Subject: [Caml-list] camlidl - finalizing cows without COM!

I have just started hacking in camlidl and for now had a really pleasant

However I really can't find out how to create a finalized object without
going into COM interfaces.

Say my underlying C library for manipulating ..... hmmm.. cows  has a
function that creates and references a new cow, and a function that is used
to de-reference the cows when they no longer are live:

typedef int cow;
cow createAndReferenceCow(void);
void freeCow(cow);

Now, when the OCaml structures for some reason decide to garbage collect my
cow the finalized object should call freeCow......  I have done this a bunch
of times without the idl interface, but have no clue how to specify this in
an idl file.  Help!!!

And I would really *love* not to bring COM interfaces into this...


- Jakob Lichtenberg
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners