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 leak in C snippet?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-12-31 (11:14)
From: Lodewijk Voge <lodewijk@r...>
Subject: Re: [Caml-list] memory leak in C snippet?
On 31-dec-04, at 10:35, Matthieu Brucher wrote:

> I'm not very into Ocaml at the moment, so perhaps what I will say 
> isn't relevant, but you seem to allocate 2 memory blocs in your 
> function (alloc_string and alloc_tuple), but where do you free this 
> memory ? Does OCaml take charge of this or do you still have to do it 
> yourself as it is in a C function ?

no, ocaml is supposed to do this. if it didn't, the daemon wouldn't 
last an hour, let alone a week :)

I think I'll file this as a bug and see what the gurus have to say 
about it. I'm staring myself silly at the code snippet and the manual 
and it's not helping.