Rules for dynamic memory allocation!

Rules that I follow for dynamic memory allocation are as follows… 1. Do not mix different memory allocation and freeing mechanisms. For e.g. do not use free to free memory allocated by new and do not use delete to free memory allocated by malloc/calloc etc. You may ask why, the answer is simple, it’s just […]
Continue reading…