[project @ 2001-03-13 21:21:27 by qrczak]
authorqrczak <unknown>
Tue, 13 Mar 2001 21:21:27 +0000 (21:21 +0000)
committerqrczak <unknown>
Tue, 13 Mar 2001 21:21:27 +0000 (21:21 +0000)
commit8abcce117d3c5195a78ae42c821e7882b606d260
treec871ac0b00a53c54ba37a0d9fc5c544679d8ff43
parent6b04e604ab6c912e0995074ef360030005f79e00
[project @ 2001-03-13 21:21:27 by qrczak]
Add 'destruct :: Ptr a -> IO ()' method to class Storable. Thanks
Wojciech Moczydlowski <khaliff@astercity.net> for the suggestion.

It should free memory associated with the object (except the object
pointer itself). A default definition does nothing, but will be
non-trivial for some C structs.

The canonical ForeignPtr finalizer for a malloced data object would be
'destruct p >> free p'.
ghc/lib/std/PrelStorable.lhs