Memory leak fix in macro IMPLEMENT_CLASS_INFO