4 ms·
If you have a small team and everybody has much C++ experience you can pull this off. Otherwise one person who doens't have the discipline to do the manual memo
by tobias3 16y ago
If you have a small team and everybody has much C++ experience you can pull this off. Otherwise one person who doens't have the discipline to do the manual memory management right can crash the whole server. Don't try it at home ;) use an VM-language instead which can recover from such errors.
(I wrote some C++ webapps myself)
- maxtaco 16y agoManual memory management is for the birds. Use something like Boost's shared pointers and you never need to worry about it.
- api 16y agoYou can also often make clever use of RAII and STL container classes and do memory management that way.
- Peaker 16y agoThat's not entirely honest. A) You still have to worry about it when interfacing with libraries that use plain pointers B) Shared pointers incur runtime penalties (larger data pushes things off the cache, spurious inc/dec-refs messing said cache. If you don't care about that, why do you use a language like C++ in the first place? C) Reference counting is a poor form of automatic memory management, you still have to worry about cycles, and use weak references or such to break the cycles.