I’m fearing something with the new use of InAppBrowser, there’s a risk of making a memory leak with the code below.
What’s happening if the user click once, then go back from the browser to the app, click again, and repeat the process.
Each new InAppBrowser
object are created, but not flushed, should i listen the close event to clear it?
@Component({
template: '<button ngClick="openLink(myUrl)">Open in browser</button>'
})
export class MyClass {
private myUrl: string;
constructor() {
this.myUrl = 'http://www.google.com';
}
private openLink(url: string) {
let browser = new InAppBrowser(url, '_system', 'location=true');
}
}