This time I will bring you how to deal with memory leaks inimg tagsin IE. What are theprecautionsfor dealing with memory leaks in img tags in IE. The following is a practical case. Let’s take a look.
Code:
Release the js code that img takes up memory:
$("#p").find("img").each(function () { $(this).attr("src", ""); $(this).remove(); }); CollectGarbage();
I believe you have mastered the method after reading the case in this article. For more exciting information, please pay attention to other related articles on the PHP Chinese website!
Recommended reading:
The above is the detailed content of How to deal with memory leaks in img tags in IE. For more information, please follow other related articles on the PHP Chinese website!