memory management - Java input = "" isn't the same as input = null? -


I am running a J2ME application and in some serious memory problems.
So, to clarify, I have processed a large input string and its data in another step and clean it. But as long as I did not set input = null and the problem is not resolved by input = "" Done

Should not it be in the context of memory management? Can anyone tell me the difference please?

Thanks, RAIT

 for  (int x = 0; x & lt; = ChunksPartCount; x ++) {_model.setLoading_bar_progress (x * ChunkSize)); Input + = web_service.FullCompanyListChunksGet (X, Chunky); If ((x * chancishey)> 5000) {readXML (input); Input = null; }}  

Edit:
Still as a solution I want to flag an answer. I think the comments of mmers are going in the right direction.

Each variable is actually "data" in memory.

Input = "" assigns input to string object. There is a length (0) and an empty array, as well as some other figures associated with it.

input.length () will return 0 at this point.

Input = Null indicates the input point "invalid" is a special type of case that means that this indicator is nothing, it has been assigned.

input.length () will throw an exception now because you are calling. nothing.


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -