if you use new you use delete, if you use malloc you use free.
In lite-c you just use ptr_remove and your fine. Just keep and mind not to use local pointers from stack.