cwyckoff/babel_icious — pull request #2 by tikicocoa (2012-10-19 20:15:06+00:00)
Title: Fixed Memory Leak in new_node for XML mapping

@gc_context was causing a memory leak since all new nodes that get created refer to the same @gc_context (nokogiri xml document). Under method new_node context.create_element does two things: creates a new xml element and sets xml element's document to context. Thus, when Garbage Collector (GC) frees memory, GC cannot remove any elements created with new_node because all these nodes refer to gc_context--which is set upon configuration of mapper. So I've removed @gc_context, updated the code, and changed the code to create a new xml document every time Mapper.translate occurs.