This means you have to manually keep track of what memory is being used and free it when you no longer wish to use it. Lower level languages such as C and C++ do not provide a garbage collector out of the box. When an object is no longer being used the garbage collector automatically frees up the memory. Behind the scene the garbage collector ("GC") is keeping track of what objects are still being used. This means you can create a new object, use it for a while, and when you are done using it you set the variable that points to it as null and that's the end of your worries. It is a feature of many modern languages that you may have already used (C#, Python, Javascript, etc.) so you may already be using it without even knowing! In a garbage collected environment objects are automatically removed from memory after you stop using them. Garbage Collection is a form of automatic memory management.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |