Re: Private members of ref counted classes and lambdas

2015-06-04 Thread Botond Ballo
On Thu, Jun 4, 2015 at 2:24 PM, Seth Fowler wrote: > My impression was that the conclusion was “refcounted objects are not banned > inside C++ lambdas” - i.e., no policy change from the status quo - "but we > need to be aware of the pitfalls”. The pitfalls are discussed pretty > thoroughly in t

Re: Private members of ref counted classes and lambdas

2015-06-04 Thread Andrew Osmond
Turns out my original problem was some other mistake I made. Using just self works (thanks botond for the poke on IRC about that). I remember reading the linked thread, although I had since forgotten about it -- thanks for the reminder. My impression was that using raw pointers for ref counted obj

Re: Private members of ref counted classes and lambdas

2015-06-04 Thread Seth Fowler
> On Jun 4, 2015, at 11:17 AM, Daniel Holbert wrote: > > You may be interested in this thread from a few months back: > "Proposal to ban the usage of refcounted objects inside C++ lambdas in > Gecko" > https://groups.google.com/d/msg/mozilla.dev.platform/Ec2y6BWKrbM/xpHLGwJ337wJ > > (Not sure i

Re: Private members of ref counted classes and lambdas

2015-06-04 Thread Daniel Holbert
On 06/04/2015 07:29 AM, Andrew Osmond wrote: > Suppose I have some ref counted class Foo with the private member mBar. > Normally with a lambda expression, [...] > obviously the Foo object could get released before the dispatch > completes You may be interested in this thread from a few months bac