воскресенье, 9 июля 2017 г., 4:10:43 UTC+3 пользователь Boris Zbarsky написал: > On 7/5/17 5:41 AM, nmago wrote: > > char* cname = new char[N]; > > memcpy(cname, &name, N); > > nsACString strName(cname, N, 0); > > This copies the data twice, and leaks it once, as far as I can tell. > > What, exactly, are you trying to accomplish? For example, do you need > an nsACString that has a copy of your data or just points into it > temporarily? > > -Boris
Yes, I needed nsACString copy of data to use it as nsACString argument for other function. Have I delete pointer after use to ged rid of leaking? Thank you! _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform