On Saturday, 28 February 2015 at 02:55:14 UTC, Michel Fortin
wrote:
On 2015-02-27 23:11:55 +, deadalnix said:
On Friday, 27 February 2015 at 23:06:26 UTC, Andrei
Alexandrescu wrote:
OK, so at least in theory autorelease pools are not necessary
for getting ARC to work? -- Andrei
ARC need
On Friday, 27 February 2015 at 21:21:08 UTC, Andrei Alexandrescu
wrote:
On 2/27/15 1:02 PM, Michel Fortin wrote:
On 2015-02-27 20:34:08 +, Steven Schveighoffer said:
void main()
{
C2 c2 = new C2;
c2.c = new C;
foo(c2.c, c2);
}
Still same question. The issue here is how do you
On 2015-02-27 23:11:55 +, deadalnix said:
On Friday, 27 February 2015 at 23:06:26 UTC, Andrei Alexandrescu wrote:
OK, so at least in theory autorelease pools are not necessary for
getting ARC to work? -- Andrei
ARC need them, this is part of the spec. You can have good RC without them
DIP74's function call protocol for RCOs has the caller insert opAddRef
for each RCO passed by value. Then the callee has the responsibility to
call opRelease (or defer that to another entity). This choice of
protocol mimics the constructor/destructor protocol and probably shows
our C++ bias.
On Friday, 27 February 2015 at 18:24:27 UTC, Andrei Alexandrescu
wrote:
DIP74's function call protocol for RCOs has the caller insert
opAddRef for each RCO passed by value. Then the callee has the
responsibility to call opRelease (or defer that to another
entity). This choice of protocol
On Fri, Feb 27, 2015 at 10:24:26AM -0800, Andrei Alexandrescu via Digitalmars-d
wrote:
DIP74's function call protocol for RCOs has the caller insert opAddRef
for each RCO passed by value. Then the callee has the responsibility
to call opRelease (or defer that to another entity). This choice of
On 2/27/15 3:30 PM, Steven Schveighoffer wrote:
void main()
{
C c = new C; // ref counted class
C2 c2 = new C2; // another ref counted class
c2.c = c;
foo(c, c2);
}
Bleh, that was dumb.
void main()
{
C2 c2 = new C2;
c2.c = new C;
foo(c2.c, c2);
}
Still same question. The issue here
On 2/27/15 1:24 PM, Andrei Alexandrescu wrote:
DIP74's function call protocol for RCOs has the caller insert opAddRef
for each RCO passed by value. Then the callee has the responsibility to
call opRelease (or defer that to another entity). This choice of
protocol mimics the
On 2/27/15 1:02 PM, Michel Fortin wrote:
On 2015-02-27 20:34:08 +, Steven Schveighoffer said:
On 2/27/15 3:30 PM, Steven Schveighoffer wrote:
void main()
{
C c = new C; // ref counted class
C2 c2 = new C2; // another ref counted class
c2.c = c;
foo(c, c2);
}
Bleh, that was dumb.
void
On 2015-02-27 20:34:08 +, Steven Schveighoffer said:
On 2/27/15 3:30 PM, Steven Schveighoffer wrote:
void main()
{
C c = new C; // ref counted class
C2 c2 = new C2; // another ref counted class
c2.c = c;
foo(c, c2);
}
Bleh, that was dumb.
void main()
{
C2 c2 = new C2;
c2.c =
On 2/27/15 12:34 PM, Steven Schveighoffer wrote:
On 2/27/15 3:30 PM, Steven Schveighoffer wrote:
void main()
{
C c = new C; // ref counted class
C2 c2 = new C2; // another ref counted class
c2.c = c;
foo(c, c2);
}
Bleh, that was dumb.
void main()
{
C2 c2 = new C2;
c2.c = new C;
On Friday, 27 February 2015 at 20:30:20 UTC, Steven Schveighoffer
wrote:
OK, I found the offending issue. It's when you pass a
parameter, the only reference holding onto it may be also
passed as well. Something like:
void foo(C c, C2 c2)
{
c2.c = null; // this destroys 'c' unless you
On 2/27/15 4:15 PM, Andrei Alexandrescu wrote:
On 2/27/15 12:34 PM, Steven Schveighoffer wrote:
On 2/27/15 3:30 PM, Steven Schveighoffer wrote:
void main()
{
C c = new C; // ref counted class
C2 c2 = new C2; // another ref counted class
c2.c = c;
foo(c, c2);
}
Bleh, that was dumb.
void
On Friday, 27 February 2015 at 21:21:08 UTC, Andrei Alexandrescu
wrote:
On 2/27/15 1:02 PM, Michel Fortin wrote:
On 2015-02-27 20:34:08 +, Steven Schveighoffer said:
On 2/27/15 3:30 PM, Steven Schveighoffer wrote:
void main()
{
C c = new C; // ref counted class
C2 c2 = new C2; //
On 2/27/15 2:46 PM, Michel Fortin wrote:
On 2015-02-27 21:33:51 +, Steven Schveighoffer said:
I believe autorelease pools are not needed for ARC, but are maintained
because much Objective-C code contains MRC, and that protocol needs to
be supported.
Exactly.
OK, so at least in theory
On Friday, 27 February 2015 at 23:06:26 UTC, Andrei Alexandrescu
wrote:
On 2/27/15 2:46 PM, Michel Fortin wrote:
On 2015-02-27 21:33:51 +, Steven Schveighoffer said:
I believe autorelease pools are not needed for ARC, but are
maintained
because much Objective-C code contains MRC, and that
On 2015-02-27 21:33:51 +, Steven Schveighoffer said:
I believe autorelease pools are not needed for ARC, but are maintained
because much Objective-C code contains MRC, and that protocol needs to
be supported.
Exactly.
--
Michel Fortin
michel.for...@michelf.com
http://michelf.com/
17 matches
Mail list logo