pub fn release(&mut self, oid : JavaObjectId) {
		// forward request to ObjectBroker for remote objects
		if !self.owned_objects.contains_key(&oid) {
			let op = OB_REMOTE_OBJECT_OP(self.tid, oid, REMOTE_RELEASE);
			self.get_thread().send_message(op);
			return;
		}

		{
			// if this is a local object, release it 
			let m = self.owned_objects.find_mut(&oid).unwrap();
			if m.intern_release() {
				return;
			}
		}
		
		// the object's reference counter reached zero
		// and we can therefore safely drop it.
		self.owned_objects.pop(&oid);
	}
// ----------------------------------------------
// AddRef a specific java object. This works both for local
// objects (i.e. owned by current thread) and for remote
// objects.
AddRef a specific java object. This works both for local
objects  and for remote
objects.
AddRef a specific java object . This works both for local objects and for remote objects .
pub fn release(&mut self, oid : JavaObjectId) {
		// forward request to ObjectBroker for remote objects
		if !self.owned_objects.contains_key(&oid) {
			let op = OB_REMOTE_OBJECT_OP(self.tid, oid, REMOTE_RELEASE);
			self.get_thread().send_message(op);
			return;
		}
		{
			// if this is a local object, release it 
			let m = self.owned_objects.find_mut(&oid).unwrap();
			if m.intern_release() {
				return;
			}
		}
		// the object's reference counter reached zero
		// and we can therefore safely drop it.
		self.owned_objects.pop(&oid);
	}
pub fn release ( & mut self , oid : JavaObjectId ) { // forward request to ObjectBroker for remote objects if ! self . owned_objects . contains_key ( & oid ) { let op = OB_REMOTE_OBJECT_OP ( self . tid , oid , REMOTE_RELEASE ) ; self . get_thread ( ) . send_message ( op ) ; return ; } { // if this is a local object, release it  let m = self . owned_objects . find_mut ( & oid ) . unwrap ( ) ; if m . intern_release ( ) { return ; } } // the object's reference counter reached zero // and we can therefore safely drop it. self . owned_objects . pop ( & oid ) ; }
AddRef a specific java object.
AddRef a specific java object .
&mut self
oid
JavaObjectId