One point of attention of STL String

xiaoxiao2021-03-06  63

STL for efficiency optimization, many direct pointer copies, sometimes this link, resulting in some memory errors today when writing COM, because simplified operations, separate the New and Delete (Methods below http: // blog .9cbs.net / newkey007 / archive / 2004/07/09 / 38139.aspx), in a class = overload, m_strfilename = raufile.m_strfilename; cause a HEAP error, it is not paying attention to String's memory optimization problem, modify m_strfilename = raufile.m_strfilename.c_str (); modified bug.

转载请注明原文地址:https://www.9cbs.com/read-84580.html

New Post(0)