MCPcopy Index your code
hub / github.com/NetHack/NetHack / dealloc_obj_real

Function dealloc_obj_real

src/mkobj.c:2814–2827  ·  view source on GitHub ↗

actually deallocate the object */

Source from the content-addressed store, hash-verified

2812
2813/* actually deallocate the object */
2814staticfn void
2815dealloc_obj_real(struct obj *obj)
2816{
2817 if (obj->oextra)
2818 dealloc_oextra(obj);
2819
2820 /* clear out of date information contained in the about-to-become
2821 stale memory so that potential used-after-freed bugs (should never
2822 happen) might trigger an object lost panic instead of continuing;
2823 linking with a debugging malloc library is likely to do something
2824 similar so this is mainly useful for ordinary malloc/free */
2825 *obj = cg.zeroobj;
2826 free((genericptr_t) obj);
2827}
2828
2829/* free all the objects marked for deletion */
2830void

Callers 2

dealloc_objFunction · 0.85
dobjsfreeFunction · 0.85

Calls 1

dealloc_oextraFunction · 0.85

Tested by

no test coverage detected