I've run into a problem which I'd like to hope is a bug, but
let's see if we can figure out if I'm doing something stupid
first, eh?
When a destructor calls a function from another module, I get an
InvalidMemoryOperationError. When a destructor calls a function
from another class in the same
On Thursday, 25 April 2013 at 15:50:27 UTC, Volfram wrote:
Further info can be provided if necessary.
Can you provide a full program that exhibits the behavior, or at
least a stack trace?
You may need to recompile Phobos and Druntime with the -gs flag
to enable correct stacktraces.
On 2013-04-25 17:50, Volfram wrote:
I've run into a problem which I'd like to hope is a bug, but let's see
if we can figure out if I'm doing something stupid first, eh?
When a destructor calls a function from another module, I get an
InvalidMemoryOperationError. When a destructor calls a functi
On Thursday, 25 April 2013 at 16:00:31 UTC, Vladimir Panteleev
wrote:
On Thursday, 25 April 2013 at 15:50:27 UTC, Volfram wrote:
Further info can be provided if necessary.
Can you provide a full program that exhibits the behavior, or
at least a stack trace?
You may need to recompile Phobos
On Thursday, 25 April 2013 at 16:17:57 UTC, Jacob Carlborg wrote:
You cannot access GC controlled memory in class destructors.
Not true.
There's no guarantee in which order the destructors will be
called. You don't know if the memory is still valid in a
destructor.
The memory is valid, it'
> Regardless, the above (accessing objects in destructors) is not related
> to the InvalidMemoryOperationError. See the documentation for it:
> http://dlang.org/phobos/core_exception.html#.InvalidMemoryOperationError
I had/have the same problem, it also occurs if you allocate in a
destructor durin
On 2013-04-25 19:57, Vladimir Panteleev wrote:
Regardless, the above (accessing objects in destructors) is not related
to the InvalidMemoryOperationError. See the documentation for it:
http://dlang.org/phobos/core_exception.html#.InvalidMemoryOperationError
Yeah, I though that was weird.
--
/
Further inspection suggests that the BetaClass object I was
accessing was already finalized by the time the AlphaClass object
got around to trying to mess with it. Conclusion is that whether
it's the in-destructor access or not, it's simply not safe to try
to clean things up this way. I think
On Thu, 25 Apr 2013 10:57:13 -0700, Vladimir Panteleev
wrote:
On Thursday, 25 April 2013 at 16:17:57 UTC, Jacob Carlborg wrote:
You cannot access GC controlled memory in class destructors.
Not true.
Can you be more specific? Maybe the wording was too strong. Should say
"you shouldn't
On Saturday, 27 April 2013 at 06:12:03 UTC, Steven Schveighoffer
wrote:
On Thu, 25 Apr 2013 10:57:13 -0700, Vladimir Panteleev
wrote:
On Thursday, 25 April 2013 at 16:17:57 UTC, Jacob Carlborg
wrote:
You cannot access GC controlled memory in class destructors.
Not true.
Can you be more s
On Sat, 27 Apr 2013 07:58:25 -0700, Vladimir Panteleev
wrote:
On Saturday, 27 April 2013 at 06:12:03 UTC, Steven Schveighoffer wrote:
On Thu, 25 Apr 2013 10:57:13 -0700, Vladimir Panteleev
wrote:
On Thursday, 25 April 2013 at 16:17:57 UTC, Jacob Carlborg wrote:
You cannot access GC con
On Sunday, 28 April 2013 at 14:44:32 UTC, Steven Schveighoffer
wrote:
On Sat, 27 Apr 2013 07:58:25 -0700, Vladimir Panteleev
wrote:
On Saturday, 27 April 2013 at 06:12:03 UTC, Steven
Schveighoffer wrote:
On Thu, 25 Apr 2013 10:57:13 -0700, Vladimir Panteleev
wrote:
On Thursday, 25 April 2
On Sun, 28 Apr 2013 16:25:06 -0700, Vladimir Panteleev
wrote:
On Sunday, 28 April 2013 at 14:44:32 UTC, Steven Schveighoffer wrote:
No, destructors are called along with deallocation. At the moment, the
GC mutex is held while the collection is in progress, so it's not
possible that a d
13 matches
Mail list logo