Manually allocate delegate?
Tofu Ninja via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun Jul 12 05:13:27 PDT 2015
On Sunday, 12 July 2015 at 11:42:09 UTC, ketmar wrote:
> On Sun, 12 Jul 2015 09:03:24 +0000, Tofu Ninja wrote:
>
>> On Sunday, 12 July 2015 at 08:47:37 UTC, ketmar wrote:
>>> On Sun, 12 Jul 2015 08:38:00 +0000, Tofu Ninja wrote:
>>>
>>>> Is it even possible?
>>>
>>> what do you mean?
>>
>> Sorry, thought the title was enough.
>>
>> The context for a delegate(assuming not a method delegate) is
>> allocated by the GC. Is there any way to allocate the context
>> manually.
>
> nope. there is no way to overload context allocation function,
> afaik. at least without patching druntime, and i still don't
> know what one have to patch. ;-)
Hmmmmm.... with allocators being added, this seems like something
that needs to be fixed. Maybe when allocators do get added then
the implicit allocations for the context could be done with the
global allocator, that and other implicit allocations like array
resizing. Guess I will just wait and see how it plays out.
More information about the Digitalmars-d-learn
mailing list