![]() ![]() ![]() While they have their place in some applications, they aren't always a great fit for others (ie: where manual memory management is commonplace. The use of smart pointers really comes down to developer preference and/or the intended use of the resulting program or system. It is therefore incredibly important that the developer understands the result of certain, critical, calls which deal with object construction and destruction. Nearly all C and C++ projects on which I've contributed, past and present, leave memory management even at the lowest and most raw level up to the programmer. This is not because I find anything wrong with them necessarily, I've just not dealt with code that utilizes them all that often. First off, I tend to shy away from smart pointers. Thanks for the feedback, but you have made a critical assumption about how this example factory pattern would be used. ![]() Int GetNumberOfLegs() const Īssert(NULL = unknown) // can't be produced by class factoryĪlso big thanks to Cale for taking his time creating this HowTo. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |