search

Home  >  Q&A  >  body text

angular.js - If I use reactjs or angularjs router to build a single-page APP, will the page occupy too much memory?

After the page transition, how is the memory of the previous page destroyed? Will it affect performance?

滿天的星座滿天的星座2821 days ago613

reply all(3)I'll reply

  • 高洛峰

    高洛峰2017-05-15 16:59:04

    You can configure the cache number of pages. When the maximum cache number is reached, the earliest page will be moved out of the memory. When rolling back, it will be judged whether it exists in the cache, and then it will be determined whether to read the cache or the server.

    reply
    0
  • 巴扎黑

    巴扎黑2017-05-15 16:59:04

    Basically don’t worry. Generally speaking, if you follow the official recommended writing method, you don’t need to worry about memory release. The framework will take care of these things. If you want to know more, you can take a look at closures and the automatic destruction mechanism of js.

    reply
    0
  • ringa_lee

    ringa_lee2017-05-15 16:59:04

    Yes, it mainly depends on how you write the code

    reply
    0
  • Cancelreply