title: Best technique for memory allocation - reuse one gloabal memory or allocate many local buffers and let it be garbage collected
body: <p>I am reading a bunch of byte messages from a file. 
  I want to read each message into buffer, do a little parsing, and then store the messages a objects with field data.</p>
  
  <p>In general, is it better to allocate one chunk of memory with a global reference and reuse it for each message I read or allocate local object a different chunk of memory for each message(this way it can be gargage collected since there are no global reference)?</p>
  
  <p>Also, is there some reference somewhere that has list of good Java programming practices/design that might cover this and other desired techniques for building Java code? I have been coding Java for a long time but not sure if all my techniques are the most desirable.</p>