Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Significant memory leak, possibly caused by ng-repeat #6429

@c0bra

Description

@c0bra

I've spent the last couple days tracking down a memory leak in a custom directive and decided to try reproducing it with just pure ng-repeat. You can see a demo here (wait the for XHR to load):

http://embed.plnkr.co/v9HVH4/

The plunker swaps between identical routes every 1/4 second, a total of 20 times. You can see the memory in the developer tools timeline grow by about 6MB per route change (from 14MB to ~140MB for me).

Some notes:

  1. This happens with automatic and manual route changes.
  2. It happens outside plunker, I can reproduce on my local machine by downloading the plunk.
  3. The timing doesn't matter. Swapping routes every 2 seconds shows the same results.
  4. I cannot reproduce with heap snapshots When I do the 3-snapshot method I don't see any deltas, and the memory stays the same. Could this be related to this bug with Chrome?: https://code.google.com/p/v8/issues/detail?id=2073
  5. I have been able to reproduce this in latest Chrome and in Canary.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions