logoalt Hacker News

cogman10today at 2:52 PM2 repliesview on HN

Java garbage collection is what's allowing those 100+ poorly optimize mods to be functional at the same time in the first place.

Games with robust modding will almost always feature a garbage collected language which is what's primarily used for the modding.

Consider this, if the mod interface was C/C++, do you think those poorly optimized mods could be trusted to also not leak memory?


Replies

willis936today at 6:34 PM

>Consider this, if the mod interface was C/C++, do you think those poorly optimized mods could be trusted to also not leak memory?

Of course. Because they would fail loudly and would have to be fixed in order to run. Garbage collection is a crutch which lets broken things appear not broken.

show 1 reply
aleph_minus_onetoday at 3:31 PM

> Consider this, if the mod interface was C/C++, do you think those poorly optimized mods could be trusted to also not leak memory?

Garbage collection does not solve memory leak problems. For example

- keeping a reference too long,

- much more subtle: having a reference to some object inside some closure

will also cause memory leaks in a garbage-collected language.

The proper solution is to consider what you name "poorly optimized mods" to be highly experimental (only those who are of very high quality can be treated differently).

show 1 reply