Memory leak with window.open(url, target)

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Memory leak with window.open(url, target)

Postby woytaz » Fri Aug 30, 2019 4:41 am

Hi,

We're experiencing a memory leak when calling window.open with two parameters (URL and target): memory usage increases when the window is opened this way but doesn't drop after closing it. Heap snapshots show that there are detached windows (one per window.open).

Can be reproduced in cefclient sample application:
  • Right-click -> "Show DevTools"
  • Go to console and call for example: window.open("https://www.google.com/", "target")
  • Close the newly opened window
  • Repeat the above two multiple times while observing memory usage.
We checked cefclient for both CEF 3729 and 3809 and the behavior is the same as in our application -- memory usage doesn't drop after closing the windows and heap snapshots show detached windows.

This doesn't happen in cefclient when using "Tests" -> "Popup Window", which calls window.open without the target parameter. Then the behavior is as expected: memory usage increases while the window is open and drops soon after closing it.

Is there some additional clean-up that we need to do when closing windows opened this way?
woytaz
Newbie
 
Posts: 3
Joined: Fri Aug 30, 2019 1:41 am

Re: Memory leak with window.open(url, target)

Postby magreenblatt » Fri Aug 30, 2019 9:58 am

What OS are you testing on? Does the problem reproduce with Google Chrome at the same version?
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Memory leak with window.open(url, target)

Postby woytaz » Mon Sep 02, 2019 6:37 am

magreenblatt wrote:What OS are you testing on? Does the problem reproduce with Google Chrome at the same version?

We definitely have it on Windows 10 Pro (1809) and I think macOS 10.14 (I'll double-check).
And yes, it seems to reproduce in Chrome as well.
woytaz
Newbie
 
Posts: 3
Joined: Fri Aug 30, 2019 1:41 am

Re: Memory leak with window.open(url, target)

Postby magreenblatt » Mon Sep 02, 2019 10:08 am

Since it reproduces in Chrome you should find/file a bug at https://crbug.com
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Memory leak with window.open(url, target)

Postby woytaz » Tue Sep 03, 2019 2:03 am

magreenblatt wrote:Since it reproduces in Chrome you should find/file a bug at https://crbug.com

Alright, will do. Thanks for the quick answers and confirming it's a bug.
woytaz
Newbie
 
Posts: 3
Joined: Fri Aug 30, 2019 1:41 am


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 129 guests