add finalizer to MxArray