
13 May
2003
13 May
'03
5:47 p.m.
Mark Sizer said:
Is there a convention about whether or not to explicitly call .unlock()?
In the case where everything to the end of the scope should be locked, there is no NEED to do it, but isn't it a bit sloppy to leave locks locked?
Certainly not. That's the purpose of the RAII idiom.
Much like not using braces on one-line 'if' statements, it could cause maintenance problems later.
I wouldn't think so, but maybe you have a use case to share where you think it could? -- William E. Kempf