I don't know if I'm missing something or there is a memory leak in CanJs 3.
Following these steps anyone can reproduce the problem (I'm using Google Chrome):
- Open a new tab.
- Press F12 to show developer tools.
- Open http://www.place-my-order.com/
- Switch to Profiles tab on developer tools and take a heap snapshot.
- Click on the Restaurants link on the place-my-order page, then click on the Home link.
- Take another heap snapshot.
- Repeat step 5. and 6.
- On the Profiles tab select Snapshot 3 and list 'Objects allocated between Snapshot 1 and Snapshot 2'.
- Select for example the HTMLAnchorElement and view the details.
There are three detached HTMLAnchorElement DOM elements that are not garbage collected.