CreateObjectURL memory leak in Chrome CreateObjectURL memory leak in Chrome google-chrome google-chrome

CreateObjectURL memory leak in Chrome


I have the same problem with the createObjectURL method. In the end, I find that the memory can be released by adding the code in the onload function:

this.src = '';

However, the image will disappear from the web page, as you may expect.In addition, I also notice that sometimes the chrome (50.0.2661.102) or chrome canary (52.0.2740.0) fails to release the memory even with this.src= ''. Once it happens, you need to restart chrome. Simply refresh the page doesn't work.

I have tried the readAsDataURL method, too. The memory can be released well (even as the chrome fails to release memory for createObjectURL with this.src=''.) However, the drawback is that the speed is rather slow (around 10x longer as compared to createObjectURL).