support lua ref/save state to alloc_ud
lua friendly w/o contructor