Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9013579
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T03:18:14+00:00 2026-06-16T03:18:14+00:00

I’ve got an app build using Backbone Relation that is leaking memory like crazy.

  • 0

I’ve got an app build using Backbone Relation that is leaking memory like crazy. From what I understand this is because I am never calling Backbone.Relational.store.unregister() on my models, causing them to be kept in the store forever and ever.

The data model is fairly deep with many inter-related classes, and I’m more or less continuously fetching model trees matching a changing filter. Ownership of individual models is however unclear as they might also be in use by other parts of the app other than then the one that initially fetched them.

When should I be unregistering the models? After reading the source for Backbone Relational I can see that unregister() is called on ‘destroy’, but since I’m never deleting models that’s a no go.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T03:18:16+00:00Added an answer on June 16, 2026 at 3:18 am

    You should probably describe your setup a bit more. How do you manage and access your models in general? Do you have application scoped singleton collections?

    We solved this issue by binding the unregistration to the collection’s remove event. If effect, then, the models were only relational when they were a part of the collection. After a model was removed from the collection, it was discarded. This may or may not work for you, depending on your application’s architecture.

    Side note: I’ve since given up Backbone.Relational, because in my experience it is extremely dangerous. When you start using it, it works like a charm, but it’s easy to shoot yourself in the face down the line. Much as you appear to have. And because its design encourages you to couple it tightly with every facet of your application code, getting rid of it can be very difficult.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For some reason, after submitting a string like this Jack’s Spindle from a text
I've got a string that has curly quotes in it. I'd like to replace
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I know there's a lot of other questions out there that deal with this
Does anyone know how can I replace this 2 symbol below from the string
I am using Paperclip to handle profile photo uploads in my app. They upload
I am using jsonparser to parse data and images obtained from json response. When

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.