does transient nature have to do anything with garbage collected?
No, nothing.
The transient
keyword indicates it should not be Serialized so if anything it will mean Deserialized objects are smaller than they would otherwise be.
We found that a class which was the reason for the memory leak trend.
You will have a memory leak because you are keeping such a object in a collection when you don't need it. You have to make sure that objects you retain this way are removed when you don't need them.
Just because you are retaining data, doesn't mean you have a leak. You could be needing that data so you need more memory than you expected. In this case you need to increase the maximum memory by setting the -Xmx
or -mx
command lines options.