Steps to reproduce:
- Have a simple app that uses the Menu API. Just package.json and index.html:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<script type="text/javascript">
var menu = new nw.Menu();
menu.append(new nw.MenuItem({ label: 'Item A' }));
</script>
</head>
<body >
</body>
</html>
- Start the app
- Take a heap snapshot from the dev tools (Profiling)
- Pick Containment from the drop down menu
Observation 1: 2 Window objects are present (Why not one but anyway)

- Make a location.reload() through the console multiple times
- Take another heap snapshot
Observation 2: Window objects have multiplied by as many times you've reloaded the app

Expected:
Since the menu variable is reinitialized on every load, the old one should be cleared by the GC
This bug is present in 0.12.3 and 0.14.5 and probably in all other versions in between
Steps to reproduce:
Observation 1: 2 Window objects are present (Why not one but anyway)

Observation 2: Window objects have multiplied by as many times you've reloaded the app

Expected:
Since the menu variable is reinitialized on every load, the old one should be cleared by the GC
This bug is present in 0.12.3 and 0.14.5 and probably in all other versions in between