http://www.perlmonks.org?node_id=1068319


in reply to Yet Another XS Tutorial

Something else I just noticed: Safefree (Perl's deallocator) is for use with New* (Perl's allocator). Use free (C's deallocator) for memory allocated with malloc and calloc (C's allocator). This will be clarified in the docs.