This helps to avoid memory leaks, which are the major cause of crashes among native applications.
这有助于避免发生内存泄漏,内存泄漏是导致本机应用程序崩溃的主要原因。
To avoid memory leaks, however, you should clear all the elements in any recycled object before reusing it.
为了防止内存泄漏,你应当在重用前清除任何被回收对象的所有元素。
In addition, you'll gain some valuable skills that may not only save a programming project, but also provide insight as to what coding practices to avoid to prevent memory leaks in future projects.
此外,您还会摸索出一些有价值的技巧,这些技巧不仅有助于节约项目的成本,而且使您能够领悟到在以后的项目中应该避免哪些编码方式来预防内存漏洞。
There are two major memory-management hazards to avoid in non-garbage-collected languages: memory leaks and dangling Pointers.
在非垃圾收集语言中需要避免两个主要的内存管理危险:内存泄漏和悬空指针。
As you have seen, you are forced to think carefully about where each object is being allocated from and how you will avoid memory leaks.
如您所见,您被迫谨慎考虑从何处分配每个对象以及如何避免内存泄漏。
As you have seen, you are forced to think carefully about where each object is being allocated from and how you will avoid memory leaks.
如您所见,您被迫谨慎考虑从何处分配每个对象以及如何避免内存泄漏。
应用推荐