{
// If the object is deleted then no point detaching.
// An object can be in L1 cache if transient and passed in to a query as a param for example
try
{
sm.detach(new DetachState(getApiAdapter()));
}
catch (NucleusObjectNotFoundException onfe)
{
// Catch exceptions for any objects that are deleted in other managers whilst having this open
}