try
{
if (!objectNotFound.contains(nonReachableIds[i]))
{
StateManager sm = findStateManager(findObject(nonReachableIds[i], true, true, null));
sm.deletePersistent();
if (i % 10000 == 0 || i == nonReachableIds.length-1)
{
// Flush every 10000 or on the last one to clear out dirties
flushInternal(true);
}