Reputation: 8192
If I call Backbone.Collection.reset() will it destroy() each model in the collection or are they still held in memory?
Upvotes: 2
Views: 493
Reputation: 1553
It does not call .destroy()
for each model, it would be odd.. The destroy()
method calls a DELETE
ajax request usually and .reset()
does nothing with syncing data to server, it clears the collection, so if the collection was the only place models were stored, we can say they not still held in memory
Upvotes: 4