awarded
awarded
awarded
awarded
Loading…
comment
malloc in caller, free in callee
Add mentioned, it's fine, but not always the best approach. If it's hard to determine the required lifetime (e.g. asynchronous task), I'd add some kind of optional callback you can pass, which would then take cleanup responsibility.
awarded
awarded
Loading…
awarded
awarded
awarded
comment
How do I document my code for minimum time review?
@MatthieuM. Well, that's also part of the crux. ;) For example, a signature
bool MyImage::loadFromStream(std::istream &stream); is nice, but the name is more complex than it has to be, since the argument talks for itself. So it's save to just use bool MyImage::load(std::istream &stream); But always keep in mind that names are typically just a human thing. After optimization most names become addresses (if at all), no matter how long the original name was. revised
How do I document my code for minimum time review?
added 1 character in body
Loading…
awarded
awarded
awarded
awarded
Loading…