内存使用量增加(Memory usage increasing)
我有一个快速的问题 - 如果应用程序在运行时使用的内存在每次加载视图控制器时都略微增加(0.1mb),那么这很重要吗? 我有一个无限级别的游戏,如果玩家失去视图控制器基本刷新(例如所有定时器失效)并且加载了主菜单控制器。 然后每次无限级重新启动时,内存(显示在调试导航器中)都会上升。 所以第一次玩的水平是226 MB,第二个是226.2 MB,第三个是226.4 MB等等。这是个问题吗?
I have a quick question- does it matter if the memory that is used by an app while it is running increases slightly (0.1mb) every single time a view controller is loaded? I have a game which has an infinite level, and if the player loses the view controller basically refreshes (e.g. all timers invalidated) and the main menu controller is loaded. Then every time the infinite level is restarted, the memory (shown in the debug navigator) goes up. So the first time the level is played it is 226 mb, the second it is 226.2 mb, third it is 226.4 mb etc. Is this a problem?
原文:https://stackoverflow.com/questions/25228697
最满意答案
你可以尝试这种方法
updateSelectType(event) { this.setState({ selectType: event.target.value, selection: [this.state.selectedEvent].filter(el => el), selectedEvent: null, }); }
You can try this approach
updateSelectType(event) { this.setState({ selectType: event.target.value, selection: [this.state.selectedEvent].filter(el => el), selectedEvent: null, }); }
相关问答
更多-
TCP/IP模型是一个________。[2023-10-02]
a -
下列中不属于面向对象的编程语言的是?[2022-05-30]
a -
for ($i = 1; $i <= 5; $i++) { $names[$i] = !empty($_POST['name_' . $i]) ? $_POST['name_' . $i] : $_POST['url_' . $i]; } for ($i = 1; $i <= 5; $i++) { $names[$i] = !empty($_POST['name_' . $i]) ? $_POST['name_' . $i] : $_POST['url_' . $i]; }
-
检查is_array($_POST["practice"]) ,这样,你就会知道它是一个数组,并且foreach永远不会抛出错误。 Check for is_array($_POST["practice"]), that way, you will know it's an array, and foreach will never throw errors.
-
分配rxFlag时输入错误。 rxFlag == 1; 应该 rxFlag = 1; You have a typo when assigning rxFlag. rxFlag == 1; should be rxFlag = 1;
-
你可以尝试这种方法 updateSelectType(event) { this.setState({ selectType: event.target.value, selection: [this.state.selectedEvent].filter(el => el), selectedEvent: null, }); } You can try this approach updateSelectType(event) { this.setState({ se ...
-
这是一种方法: (let [xs [1 2 3 4]] (map list xs (iterate rest (rest xs)))) ;= ((1 (2 3 4)) (2 (3 4)) (3 (4)) (4 ())) 这当然可以根据您的需要进行调整,例如您可能更喜欢map vector来map list等。 此外,关于问题文本中head-and-tail推理:双向分支cond将更好地写为if 。 Here's one approach: (let [xs [1 2 3 4]] (map list ...
-
我没有找到任何其他明确的简单方法来做到这一点。 但是你总是可以实现IXmlSerializable并自己处理序列化和反序列化: Public Sub ReadXml(ByVal reader As XmlReader) Implements IXmlSerializable.ReadXml reader.ReadStartElement() If (reader.Name = "SomeElement") Then Dim someElementValue = reader ...
-
你能用Float.NaN吗? public class FloatArray { public static void main(String[] args) { float[] data = new float[10]; data[5] = Float.NaN; for (float f : data){ if (Float.isNaN(f)){ System.out.println("No V ...
-
当你调用.equals(...)你调用了一个对象的方法。 如果为null,则没有方法。 因此null检查如下: if (myArray[position] == null) { .... } When you call .equals(...) you call a method of the object. If it is null, it has no method. Therefore null check like this: if (myArray[position] == null ...