There are also a couple of versions of a freemem or freememory function that are posted in the forums fairly regularly.