Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
假设我有一个定义一些对象和变量并初始化它们的方法。每隔半秒左右循环一次方法的计时器或类似的东西会占用内存,而对象和变量每半秒就会不断地定义和初始化吗?
如果它确实会使所述对象和变量全局保存内存,还是我完全偏离轨道?