3 ms·
Could Go switch between manual memory management and garbage collection after some modification? Or are some choices in the language preventing this?
by Detrus 15y ago
Could Go switch between manual memory management and garbage collection after some modification? Or are some choices in the language preventing this?
- edsrzf 15y agoIt wouldn't be difficult to add new built-in functions for allocating and freeing memory manually. If you wanted to remove garbage collection, it would require a more significant language change. There are several constructs in the language that implicitly allocate memory. If Go adds support for generics, manual memory management could be provided by a third party package.