Soldato
I over heard my boss (chief technical architect) telling someone to never deference by assigning something to null in Java.
At the time I said I thought that was a valid way to make an object eligible for garbage collection.
He then went on to mention pointers, memory leaks and memory hacking. All of which felt a little off to me. I didn't have a clear enough understanding of what he was talking about at the time to provide a good counter argument.
Anyway since I've done a bit of revision on the java garbage collector, Mark and sweep and generational heap space, to know null assignment is perfectly fine in java.
As for the other stuff I worked out he was talking about pointer arithmetic and dangling pointers, none of which is an issue in Java.
So shall I inform him or be quiet and be happy that my suspicions were correct?
At the time I said I thought that was a valid way to make an object eligible for garbage collection.
He then went on to mention pointers, memory leaks and memory hacking. All of which felt a little off to me. I didn't have a clear enough understanding of what he was talking about at the time to provide a good counter argument.
Anyway since I've done a bit of revision on the java garbage collector, Mark and sweep and generational heap space, to know null assignment is perfectly fine in java.
As for the other stuff I worked out he was talking about pointer arithmetic and dangling pointers, none of which is an issue in Java.
So shall I inform him or be quiet and be happy that my suspicions were correct?
Last edited: