clear bug?

2011-09-04 Thread Dan Olson
Using dmd 2.054 on osx: Calling a instance method after using clear() on an instance is giving me a bus error. The instance fields look like they are cleared ok, just can't safely call a method. I think this used to work after the object was cleared, and was the reason for clear() over the depre

Re: clear bug?

2011-09-05 Thread Ali Çehreli
On Sun, 04 Sep 2011 12:30:58 -0700, Dan Olson wrote: > Using dmd 2.054 on osx: > > Calling a instance method after using clear() on an instance is giving > me a bus error. "Segmentation fault" on my Ubuntu. > The instance fields look like they are cleared ok, just > can't safely call a method.

Re: clear bug?

2011-09-05 Thread Bernard Helyer
clear() nulls out the vtable.

Re: clear bug?

2011-09-05 Thread Jonathan M Davis
On Sunday, September 04, 2011 12:30:58 Dan Olson wrote: > Using dmd 2.054 on osx: > > Calling a instance method after using clear() on an instance is giving > me a bus error. The instance fields look like they are cleared ok, just > can't safely call a method. I think this used to work after the

Re: clear bug?

2011-09-05 Thread Andrej Mitrovic
On 9/6/11, Jonathan M Davis wrote: > Why would you > ever try and use an object that had been cleared? TDPL, that's why. Things might have changed but how would someone new to D know that?

Re: clear bug?

2011-09-05 Thread Jonathan M Davis
On Tuesday, September 06, 2011 02:12:11 Andrej Mitrovic wrote: > On 9/6/11, Jonathan M Davis wrote: > > Why would you > > ever try and use an object that had been cleared? > > TDPL, that's why. Things might have changed but how would someone new > to D know that? I really don't pay much attentio

Re: clear bug?

2011-09-05 Thread Dan Olson
Jonathan M Davis writes: > On Tuesday, September 06, 2011 02:12:11 Andrej Mitrovic wrote: >> On 9/6/11, Jonathan M Davis wrote: >> > Why would you >> > ever try and use an object that had been cleared? >> >> TDPL, that's why. Things might have changed but how would someone new >> to D know that

Re: clear bug?

2011-09-05 Thread Jonathan M Davis
On Monday, September 05, 2011 19:05:56 Dan Olson wrote: > Jonathan M Davis writes: > > On Tuesday, September 06, 2011 02:12:11 Andrej Mitrovic wrote: > >> On 9/6/11, Jonathan M Davis wrote: > >> > Why would you > >> > ever try and use an object that had been cleared? > >> > >> TDPL, that's why.

Re: clear bug?

2011-09-06 Thread Steven Schveighoffer
On Mon, 05 Sep 2011 22:05:56 -0400, Dan Olson wrote: Jonathan M Davis writes: On Tuesday, September 06, 2011 02:12:11 Andrej Mitrovic wrote: On 9/6/11, Jonathan M Davis wrote: > Why would you > ever try and use an object that had been cleared? TDPL, that's why. Things might have changed