r/cpp • • Dec 29 '16

Garbage collection - No Thanks

http://www.modernescpp.com/index.php/garbage-collectio-no-thanks
0 Upvotes

5 comments sorted by

2

u/JuanAG Dec 31 '16

If the cpp team has to spend 5 years to achive a GC and we lost features in the way of course i dont want any GC

But when the time comes it will be a nice feature, when all the new things get done this may be interesting, RAII works but it is not perfect, if you adquire a resource and in other part of the code happens anything you may have looked that resource until the next reboot and it is not that rare, all of us had this problem at least once. This will be the moment of the GC, something happened, you left the resource locked but your program still running, the GC will detect it and it will be free without any worries

Of course the GC should be optional (dont pay for what you dont use) to left the programmer to active it or not with a command like -allow_gc or similar

1

u/gracicot Jan 02 '17

You'd be interested in gcpp. It's a scoped garbage collected heap.

0

u/[deleted] Jan 08 '17

[deleted]

1

u/JuanAG Jan 08 '17

So you never left a file open and blocked? I doubt but if you say

0

u/[deleted] Jan 08 '17

[deleted]

1

u/AutoModerator Jan 08 '17

Your post has been automatically removed because it appears to contain profanity or slurs. Please be respectful of your fellow redditors.

If you think your post should not have been removed, please message the moderators and we'll review it.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

0

u/[deleted] Jan 08 '17

[deleted]

1

u/AutoModerator Jan 08 '17

Your post has been automatically removed because it appears to contain profanity or slurs. Please be respectful of your fellow redditors.

If you think your post should not have been removed, please message the moderators and we'll review it.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.