private static void cs_destroy_root(IntPtr inValue) { GCHandle handle = GCHandle.FromIntPtr(inValue); CSPersistent persistent = (CSPersistent)handle.Target; handle.Free(); }
private static IntPtr cs_query_root(IntPtr inValue) { CSPersistent persistent = (CSPersistent)HandleUtils.GetObjectFromIntPtr(inValue); return(CSHandleContainer.GetCurrent().CreateGCHandle(persistent.Value)); }