added clear() and destructor to RenderNode