frame: implement ReferenceCounted directly