Draw and Deleting Histogram

I have a macro which processes some data, dumps it into a histogram, then draws the histogram into a preexisting canvas for analysis. I would love to be able to delete the histogram before the program ends to avoid any memory leaks, but this removes the results of Draw(). Is there any way to keep the Draw() results in the canvas even after the histogram has been deleted?


Instead of Draw use DrawCopy


Works great, but is there any way to extend this to TStack and TLegend? Or is this asking too much? :-p

Many thanks.

I should have mentionned it.
You can use the general function DrawClone that works
for all TObject derived objects.