# For the record: how much "garbage collection" does DS actually do?

**URL:** <https://discuss.emberjs.com/t/for-the-record-how-much-garbage-collection-does-ds-actually-do/7829>\
**Category:** Ember Data\
**Created:** [April 20, 2015, 1:37pm UTC](https://discuss.emberjs.com/t/for-the-record-how-much-garbage-collection-does-ds-actually-do/7829 "2015-04-20T13:37:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![artsyca](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/artsyca/32/9693_2.png) [@artsyca](https://discuss.emberjs.com/u/artsyca)\
**Post date:** [April 20, 2015, 1:37pm UTC](https://discuss.emberjs.com/t/for-the-record-how-much-garbage-collection-does-ds-actually-do/7829/1 "2015-04-20T13:37:37Z")

</div>

Lucky enough to have a production app running to the point where efficiency concerns have come to the forefront.

The biggest thing that has stood out is is the number of `hasMany` and `belongsTo` records that get stuck in the store after the main record is unloaded/deleted/destroyed.

Since my understanding of this level of the Ember.js ecosystem is limited, I’m very interested to know just how much of the cleanup Ember will do, and how much we should do manually?

A bit of background:

`message` model has three async `belongsTo` relationships. When calling `deleteRecord` or `unloadRecord`, I don’t see any attempts by Ember to similarly `unload` or `delete` the relationships. Is this meant to be handled by Ember, or is it my responsibility?

Another example:

`analytic` model has `hasMany` relationship with `message`. Same thing. Is it a deficit in how I set up my model that Ember doesn’t auto-delete/destroy/unload, or is it actually expected that I do my own cleanup?

Any help on this issue is greatly appreciated!
