An elegant way to handle allocation and deallocation of memory is to containerize it in an object. The object can have all generally used buffers, etc. allocated at initialization, and then destroyed when the program is finished. This is more than you asked for, but you might like it. Don't do...