From: Xavier Leroy <xavier.leroy@inria.fr>
To: Jakob Lichtenberg <jl@itu.dk>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] camlidl - finalizing cows without COM!
Date: Fri, 26 Apr 2002 10:20:58 +0200 [thread overview]
Message-ID: <20020426102058.B24598@pauillac.inria.fr> (raw)
In-Reply-To: <000901c1e5c1$f47cc130$5ba4389d@redmond.corp.microsoft.com>; from jl@itu.dk on Tue, Apr 16, 2002 at 08:42:53PM -0700
> Hi,
>
> I have just started hacking in camlidl and for now had a really pleasant
> experience.
>
> 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!!!
There's a new release of CamlIDL at http://caml.inria.fr/camlidl/
that supports a "finalize" attribute to do just this, e.g.
typedef [abstract,finalize(freeCow)] int cow;
The release also fixes some minor bugs with error reporting in
presence of import files, and with "const" qualifiers. (Thanks for
Dmitry Bely for his extensive testing and bug hunting!)
- 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
prev parent reply other threads:[~2002-04-26 8:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-04-17 3:42 Jakob Lichtenberg
2002-04-18 15:30 ` Christopher Quinn
2002-04-19 3:13 ` Jakob Lichtenberg
2002-04-26 8:20 ` Xavier Leroy [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020426102058.B24598@pauillac.inria.fr \
--to=xavier.leroy@inria.fr \
--cc=caml-list@inria.fr \
--cc=jl@itu.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox