* @param schema to be flushed
*/
public static final void dispose(XSDSchema schema) {
for (XSDSchemaContent content : schema.getContents()) {
if (content instanceof XSDSchemaDirective) {
XSDSchemaDirective directive = (XSDSchemaDirective) content;
XSDSchema resolvedSchema = directive.getResolvedSchema();
if (resolvedSchema != null) {
synchronized (Schemas.class) {
resolvedSchema.getReferencingDirectives().remove(directive);
for (XSDElementDeclaration dec : resolvedSchema.getElementDeclarations()) {