Skip to content
Advertisement

Tag: heap-memory

Instance created inside of a Method

I have not been able to find any reliable literature on this but i’m curious as to where an object is stored if its created inside of a method ? on the stack or on the heap in java 8? I know that normally only local primitives, reference variables and function calls are stored on the stack and that objects

Odd heap usage pattern

I have a repeating process that: gets some data from the database builds some objects in memory, adding to a Collection writes the data from the Collection to a file All of the objects/Collections go out of scope or are set to null after each iteration. (The Collection is reused for each iteration.) Using Java VisualVM, I see a graph

Advertisement