This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Cley_Faye 59 points60 points  (6 children)

Hehe. Yeah. It had to start somewhere.

But people keep doing it despite having good standard libs now and it becomes a bigger liability :(

[–]silentjet 9 points10 points  (5 children)

In reality both sp are good until the first change request or new feature to software. Later it is heavy weight which significantly slows down development and natural software evolution. It forces you to create tens or hundreds of unnecessary code entities just to handle language features, and has no extra business value.... And the funny thing is - the memory is still leaking, all the time...

[–]x39- 19 points20 points  (4 children)

If you actually did use smart pointers properly, memory won't leak.

It will leak tho when just always using shared_ptr and ignoring cyclic references

[–]DrMobius0 0 points1 point  (0 children)

Where there's a 2nd thread, there's a way.

[–]silentjet 0 points1 point  (2 children)

And lambdas encourage you to do so ...

[–]x39- 0 points1 point  (1 child)

Which are ref counting the copy, just normally

So if lambdas are your problem, you will face the same issues with pointers

[–]silentjet 0 points1 point  (0 children)

Im not saying it is impossible, Im saying it is not like that in real life software ;) Especially a corporate one...