|
|
|
|
|
by jlebar
4008 days ago
|
|
As another example, Firefox uses "manual reflection" to e.g. build lists of all the smart pointers in some classes. It then uses these lists as part of its "cycle collector", which breaks cycles in the refcounted graph of objects. Writing and maintaining these lists is error-prone, and at least used to be a major source of memory leaks. You can imagine writing a static analysis to figure this out, and the Moz folks may have since I last checked, but if the language could do it, that would be so much better... |
|