r/ProgrammerHumor • • Oct 07 '26

Meme minecraftException

Post image
9.3k Upvotes

830 comments sorted by

View all comments

Show parent comment

9

u/mrianj Oct 07 '26

I mean, if you really don't like garbage collection, nothing stopping you from defining a 4GB byte array and managing your memory yourself. Like a psychopath.

1

u/Rickbox Oct 07 '26

I was about to say, you definitely can just remove the garbage collector. I've done it in my line of work.

-3

u/johnnybgooderer Oct 07 '26

Or you could just use c++ and not have to do all of that.

2

u/PelimiesPena Oct 07 '26 edited Oct 07 '26

Or you could use C and define such an array and manage it instead of using malloc.

1

u/johnnybgooderer Oct 07 '26

That analogy doesn’t work. Using c++ makes it easier to manually manage memory than manually doing it on an array in a language that wasn’t built for that. Both c and especially c++ are going to be a hell of a lot easier to work with without a grange collector.

1

u/PelimiesPena Oct 07 '26 edited Oct 07 '26

Yeah - you are right. I tried to think how it would work on Java - I guess it would be doable, but definetely simpler in C.

1

u/Ok-Scheme-913 Oct 09 '26

Segmentation fault