modify macro delete + add free function on the stack