C++.Coding.Standards.1918.Rules.Guidelines [Electronic resources]

Herb Sutter, Andrei Alexandrescu

نسخه متنی -صفحه : 521/ 258
نمايش فراداده

Exceptions

Always perform unmanaged resource acquisition, such as a

new expression whose result is not immediately passed to a smart pointer constructor, in the constructor body and not in initializer lists (see [Sutter02]). Of course, it's better to not have such unsafe unowned resources in the first place (see Item 13).