Updated memory_c...

Fixed an AttributeError when calling on_de/realloc callbacks.