Recolección de basura de AIR para iOS

Would anyone know whether AIR for iOS apps run garbage collection?

preguntado el 08 de noviembre de 11 a las 15:11

Are you asking whether the AIR runtime internally runs garbage collection on the code it is executing or whether the enhancements like automatic reference counting that are now possible with iOS5 are utilized by the AIR runtime? -

Hi, Tegeril. Having built apps pre-iOS5 using Xcode I'm used to there not being any garbage collection service and having to manually dealloc variables. I'm wondering if I need to be working in the same way when publishing my apps through AIR for iOS. i.e. manually tracking the references and then setting the variables to null when I'm done with the variable? -

2 Respuestas

The Flash/AIR runtime's garbage collector does indeed run in AIR for iOS applications. Explicitly setting variables to null with AIR is simply decrementing the reference count and clearing the reference, not deleting the variable. The garbage collector will later run and clear that memory.

All the information you could want about the actual garbage collector and how it works is available in a devnet article at Adobe.com

respondido 22 nov., 11:06

Puedes usar System.gc(). Aquí is the doc.

It says that this method:

is only enabled in content running in the AIR Debug Launcher (ADL) or, in an installed application, in content in the application security sandbox.

Respondido el 14 de Septiembre de 12 a las 16:09

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.