20,741
edits
m (→bottleneck()) |
m (→bottleneck()) |
||
| Line 340: | Line 340: | ||
This checks if globals->bottleneck is true, and if it is, it makes sure that the bottleneck() function is only invoked after acquiring a lock. | This checks if globals->bottleneck is true, and if it is, it makes sure that the bottleneck() function is only invoked after acquiring a lock. | ||
[[File:Nasal-gc.png|thumb|650px|Nasal GC]] | |||
https://gitorious.org/fg/simgear/blobs/next/simgear/nasal/gc.c#line99 | https://gitorious.org/fg/simgear/blobs/next/simgear/nasal/gc.c#line99 | ||
| Line 367: | Line 372: | ||
The actual garbage collection takes place in [https://gitorious.org/fg/simgear/blobs/next/simgear/nasal/gc.c#line114 line 114] where dead objects from the memory pool are freed, and the garbageCollect() function is called if globals.needGC is true. | The actual garbage collection takes place in [https://gitorious.org/fg/simgear/blobs/next/simgear/nasal/gc.c#line114 line 114] where dead objects from the memory pool are freed, and the garbageCollect() function is called if globals.needGC is true. | ||
= garbageCollect() = | = garbageCollect() = | ||