Deleting Objects
You can use the Delete method, which is inherited from the JoobObject class, to delete an instance of an exposed JADE class.
agent.Delete();
Alternatively, you can use the DeleteObject method of the JoobContext class.
JoobContext context = JoobContext.CurrentContext; context.DeleteObject(agent);
To create, modify, or delete a persistent object, you must be in transaction state. For details, see "Transactions", later in this chapter.