Warning, /sdk/clazy/docs/checks/README-lambda-in-connect.md is written in an unsupported language. File is not indexed.

0001 # lambda-in-connect
0002 
0003 Warns when a lambda inside a connect captures local variables by reference.
0004 This usually results in a crash since the lambda might get called after the captured variable went out of scope.
0005 
0006 #### Example:
0007 ````
0008     int a;
0009     connect(obj, &MyObj::mySignal, [&a]{ ... });
0010 ````
0011 Although it's dangerous to capture by reference in other situations too, this check only warns for
0012 connects, otherwise it would generate false-positives in legitimate situations where you only
0013 use the lambda before going out of scope.