Backbone中的内存泄漏

时间:2013-05-01 01:33:33

标签: javascript backbone.js

以下代码是否会导致内存泄漏?

var MyOptions = Backbone.Collection.extend({
        url: "data1.php"
      })
options = new MyOptions();

var MyOtherOptions = Backbone.Collection.extend({
        url: "data2.php"
      })
options = new MyOtherOptions(); 
// will the Backbone collection object with url
// "data1.php" be garbage collected somehow?

我不熟悉javascript的内存机制。问题出现在C程序员的预感中。

0 个答案:

没有答案