阅读背景:

如果我通过引用捕获局部变量会发生什么,并且它超出范围?

来源:互联网 

Suppose I use a lambda as a callback function, and when creating the lambda, I capture a local function variable by reference. Now suppose that the lambda object does not get executed until after that local function variable goes out of scope. What happens?Suppose I use a lambda as a callback function,




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: