4 ms·
I understand that you have legacy requirements to support elements that previous developers have used, but that doesn't explain why someone would use a shared_p
by Frogolocalypse 9y ago
I understand that you have legacy requirements to support elements that previous developers have used, but that doesn't explain why someone would use a shared_ptr in the first place. The great thing about unique_ptrs is that they take away the manual memory management. It is a complete PITA not having them. I can even see the use in weak_ptrs. My issue is with shared. I can't see how their use wouldn't lead to larger problems in code.
- pjmlp 9y agoWell, Windows projects with COM everywhere, and no access to the complete code, with responsibilities scattered across feature teams. Thankfully I only use C++ nowadays when we need to bind native libraries into Java or .NET projects, so since 2006 I never had to deal with such horror scenarios any longer.
- Frogolocalypse 9y agoI 'learned' (bumbled) through c++ almost 30 years ago. I formally learned both c and c++ properly through uni more recently. I'm not sure I'll ever use another language if i want to build something that is complex but i need to be really fast. I love c but the more complex the problem, the more infeasible it gets to use. But c++? There isn't a processing problem that you can come up with that you couldn't use c++ to resolve it with. Love the language.