From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.1 required=5.0 tests=AWL,SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 83497BC69 for ; Fri, 11 May 2007 15:19:26 +0200 (CEST) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.236]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l4BDJPYa027201 for ; Fri, 11 May 2007 15:19:26 +0200 Received: by nz-out-0506.google.com with SMTP id l8so1041378nzf for ; Fri, 11 May 2007 06:19:25 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=aT9Xl7QGMd1Y13B/oC0ooMtpowvDLDRhIgIkr7UUbrFlG6qfyVF5t5dp+NZKKsCwFXtEm+rUr9g/HSp2SrrzKCfoCXm3XYaULmZGMb6ciIoXCW/1fbosCaTB1+3eR2P7kN7fFF9oysYLfJzPHzXS/0fDV3uJIMVuotRxxjdDoL0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=N8vifi2UfHV6hLRyMm7AYIZuhoFuKI3Dziz692S7ZdnmObvGpZEWVQ/EyCXbRjq2ee+oIlH3aWscP8jeljZwRGsvGTJ96yAlNaHGd8U6q/8odcPm27rCgqhSyMWmYjBgRGR5G+BgldqMxiHJxt2TxXS/qheB5LrteSG/2Q6RULg= Received: by 10.114.144.1 with SMTP id r1mr965692wad.1178889565034; Fri, 11 May 2007 06:19:25 -0700 (PDT) Received: by 10.114.123.9 with HTTP; Fri, 11 May 2007 06:19:24 -0700 (PDT) Message-ID: <90823c940705110619g55524937p669087eaa5408df4@mail.gmail.com> Date: Fri, 11 May 2007 17:19:24 +0400 From: "Dmitry Bely" To: "Caml List" Subject: Re: [Caml-list] Ocaml DLL and memory leaks In-Reply-To: <464354B2.30806@inria.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <90823c940705090345k5c70fcc3p35ca3cc4412909c2@mail.gmail.com> <464354B2.30806@inria.fr> X-j-chkmail-Score: MSGID : 46446D5D.000 on concorde : j-chkmail score : X : 0/20 1 0.000 -> 1 X-Miltered: at concorde with ID 46446D5D.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocaml:01 ocaml:01 runtime:01 runtime:01 statically:01 wrote:01 dynamically:01 caml-list:01 dmitry:01 dmitry:01 bely:01 bely:01 dll:03 dll:03 cleanup:03 On 5/10/07, Xavier Leroy wrote: > > I have an Ocaml module packed into DLL that is dynamically loaded by > > the main C program. What should I do to free all memory taken by Ocaml > > runtime when the DLL is unloaded? > > This is not possible currently. I agree the OCaml runtime system > should one day provide a cleanup function to do this. It turned out that at least for Microsoft C runtime things are not that bad. If you statically link CRT, it will clean up all resources itself. - Dmitry Bely