fix memory leaks for web view element