Joined December 2012
·

Grady O'Connell

Prolific Axis, LLC
Prolific Axis, LLC
·
Hesperia, CA
·
·
·

Posted to Animated CPU chart in the Zsh prompt over 1 year ago

WHAT! You can animate your PS1 line!? I can already feel the ideas flooding into my brain.

@yifu I agree that smart pointers are definitely the way to go most of the time, especially if all you have are calls to delete. But every so often, you'll have multiple responsibilities for your class that require additional code, and in the case that a class handles more than one thing (and if those individual items would be too tedious to wrap into their own classes), this method works well. I would assume the actual runtime overhead is less using this method, since the template generates 1 class per usage instead of one class for every responsibility.

Achievements
92 Karma
761 Total ProTip Views