Debugging InvalidMemoryOperationError
Sam via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Mon Jul 11 06:54:15 PDT 2016
On Monday, 11 July 2016 at 13:01:31 UTC, Adam D. Ruppe wrote:
> The stack trace also says this is being triggered from the
> garbage collector. Do you have a dynamic array of RefCounted
> objects, or one inside a class object?
>
> I'm not sure as to the nature of the bug but refcounted inside
> a GC object isn't going to work well anyway.
I find this code:
// FIXME: D arrays don't call element destructors when GC-d :(
RoundBuf!CramSlice _input_queue;
Where CramSlice contains RcPtr!(cram_slice, cram_free_slice) and
RcPtr contains a RefCounted (allowing a custom free function,
wrapping C API - see
https://github.com/lomereiter/sambamba/blob/master/cram/wrappers.d#L14). What exactly are the two failure modes you are alluding to?
More information about the Digitalmars-d-learn
mailing list