@@ -209,19 +209,20 @@ } if (buf[i] == '>' || buf[i] == '/') { OFString *ns; - pool = [[OFAutoreleasePool alloc] init]; ns = namespace_for_prefix(prefix, namespaces); if (prefix != nil && ns == nil) @throw [OFUnboundNamespaceException newWithClass: isa prefix: prefix]; + + pool = [[OFAutoreleasePool alloc] init]; [delegate parser: self didStartElement: name withPrefix: prefix namespace: ns @@ -295,26 +296,26 @@ newWithClass: isa]; [previous removeNObjects: 1]; [cache setToCString: ""]; - pool = [[OFAutoreleasePool alloc] init]; - ns = namespace_for_prefix(prefix, namespaces); if (prefix != nil && ns == nil) @throw [OFUnboundNamespaceException newWithClass: isa prefix: prefix]; - [namespaces removeNObjects: 1]; + + pool = [[OFAutoreleasePool alloc] init]; [delegate parser: self didEndElement: name withPrefix: prefix namespace: ns]; [pool release]; + [namespaces removeNObjects: 1]; [name release]; [prefix release]; name = prefix = nil; last = i + 1; @@ -327,17 +328,18 @@ /* Inside a tag, name found */ case OF_XMLPARSER_IN_TAG: if (buf[i] == '>' || buf[i] == '/') { OFString *ns; - pool = [[OFAutoreleasePool alloc] init]; ns = namespace_for_prefix(prefix, namespaces); if (prefix != nil && ns == nil) @throw [OFUnboundNamespaceException newWithClass: isa prefix: prefix]; + + pool = [[OFAutoreleasePool alloc] init]; [delegate parser: self didStartElement: name withPrefix: prefix namespace: ns