MentaContainer

Compare Revisions

Ignore whitespace Rev 148 → Rev 149

/trunk/src/main/java/org/mentacontainer/impl/MentaContainer.java
98,12 → 98,16
Object value = t.get();
// we are ONLY clearing if this thread has something in the threadlocal, in other words,
// if the thread has previously requested this key...
if (value != null) listToClear.add(new ClearableHolder(c, value));
}
}
 
// and now we clear all thread locals belonging to this thread...
// this will only clear the instances related to this thread...
for(ThreadLocal<Object> t : threadLocalsCache.values()) {
t.remove();
}
}