Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Wanted - General Purpose "Glue Logic" Data-Structures
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Markus Mottl <markus@o...>
Subject: Re: [Caml-list] Re: Wanted - General Purpose "Glue Logic" Data-Structures
On Thu, 10 Apr 2003, Jean-Christophe Filliatre wrote:
> In the solution I proposed, you do not deallocate the array block when
> you delete the last element; only the size is decreased.

There is one problem with this: you still need to fill in an object. If
you use one provided by the user, this will consume memory dependent
on the object size. Therefore, it is usually best to overwrite the
slot using evil "Obj.magic" inside of the library. Note that there may
also be finalizers associated with the value or it may be monitored by
weak arrays.

Markus Mottl

Markus Mottl

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: