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] OCam'OLE pre-release
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-08-05 (09:32)
From: Xavier Leroy <xavier.leroy@i...>
Subject: Re: [Caml-list] OCam'OLE pre-release
> The job of the GC is to release unreferenced objects.
> But I don't see how this can cause a bug : it seems that your crash is due
> to a call of a COM method on a object AFTER it has been released... if it
> has been Release, then it is no longer referenced by Ocaml... so , how can u
> ever call a method on it ???

Because the COM object can still be referenced from C.  You probably
forgot to do an AddRef somewhere, e.g. when extracting a COM object
reference from its Caml wrapper.

Reference count management sure is tricky...

- Xavier Leroy
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