Will adding and removing a DOM element dynamically create memory leaks?
<p>I am adding a div to the DOM and the performing some animation on it. Once the animation is over, I am removing the div from the DOM again, like this:</p>

<pre><code>$div = $("&lt;div /&gt;", {id:"flashMsg", class: className, html:msg}).prependTo(bazingaApp.app.rightPanel);

$div.fadeIn("slow",function(){
   $(this).delay(5000).slideUp(1000, function () {
       $(this).remove();                    
   });
});
</code></pre>

<p>Will this create any memory leak?</p>