tl,dr Is it only datatypes with Close or Release methods that I need to worry about in terms of causing a memory leak?
If I declare a HttpJob inside a sub then I must use release at the end in order to not have a memory leak
Similarly for resultsets I must use the close method
I don't need to do anything like that for primitive datatypes because they only use space on the stack which will be reclaimed automatically I think.
Strings can be treated like primitives because of some clever stuff under the hood I guess
But stuff like Maps, Lists, JSONGenerators, JSONParsers they don't have close or release methods
Maps and lists do have clear methods but I don't know if this has any effect, in this context.
If I declare a HttpJob inside a sub then I must use release at the end in order to not have a memory leak
Similarly for resultsets I must use the close method
I don't need to do anything like that for primitive datatypes because they only use space on the stack which will be reclaimed automatically I think.
Strings can be treated like primitives because of some clever stuff under the hood I guess
But stuff like Maps, Lists, JSONGenerators, JSONParsers they don't have close or release methods
Maps and lists do have clear methods but I don't know if this has any effect, in this context.