Greatly improved memory deallocation of Graphic elements