Browse thread
[Caml-list] Wanted - General Purpose "Glue Logic" Data-Structures
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ 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. Regards, Markus Mottl -- Markus Mottl http://www.oefai.at/~markus markus@oefai.at ------------------- 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