add gcallocleaf() and handle leaf object case