Exemple #1
0
 protected override void ValidateDispose()
 {
     _transform.Dispose();
     _transform = null;
     if (_collider != null)
     {
         _collider.Dispose();
         _collider = null;
     }
     if (_rigidbody != null)
     {
         _rigidbody.Dispose();
         _rigidbody = null;
     }
     Util.Dispose <Component>(components);
     components = null;
     Util.Dispose <Behaviour>(behaviours);
     behaviours = null;
     Util.Dispose <Collider>(__colliders);
     __colliders = null;
     Util.Dispose <Collider>(_colliders);
     _collider = null;
     name      = null;
     base.ValidateDispose();
 }
Exemple #2
0
		protected override void ValidateDispose()
		{
			if (rigidbody != null)
			{
				rigidbody.Dispose();
				rigidbody = null;
			}
			Util.DisposeK(collisions);
			Util.DisposeK(prevCollisions);
			Util.Dispose(triggers);
			Util.Dispose(prevTriggers);
			base.ValidateDispose();
		}