public override void Delete() { if (Galleon != null) { Galleon.RemoveCannon(this); } var list = new List <PlayerMobile>(Viewing.OfType <PlayerMobile>()); foreach (var pm in list) { var gump = BaseGump.GetGump <ShipCannonGump>(pm, g => g.Cannon == this); if (gump != null) { gump.Close(); } } ColUtility.Free(list); base.Delete(); }