From D struct to C struct

Namespace rswhite4 at googlemail.com
Mon Nov 18 06:15:00 PST 2013


On Monday, 18 November 2013 at 10:09:12 UTC, qznc wrote:
> On Monday, 18 November 2013 at 08:32:11 UTC, Namespace wrote:
>> I found another approach. It avoids the GC and the Heap: A 
>> Circular Buffer:
>> http://dpaste.dzfl.pl/cf1e7afb
>>
>> That should work.
>
> It is unsafe, but might work in your specific case.
>
> The problem is that future changes might exhibit memory 
> corruption, if the limit of your buffer is too low. Would 
> probably be a hell to debug.

Yes, but I know I never need more than 4 C pointer at the same 
time.


More information about the Digitalmars-d-learn mailing list