More tests:
-removed some unused code -fixed bug with struct destructors (Mallocator called __dtor instead of __xdtor) -added unittests for events -addded _d_eh_personality null implementation as LDC betterC bug workaround
This commit is contained in:
parent
d0b7138f9f
commit
cb9eaad123
5 changed files with 160 additions and 19 deletions
|
|
@ -95,7 +95,7 @@ package struct EventManager
|
|||
|
||||
void clearEvents() nothrow @nogc
|
||||
{
|
||||
uint threads_count = cast(uint)manager.threads.length;
|
||||
//uint threads_count = cast(uint)manager.threads.length;
|
||||
foreach(ref event;events)
|
||||
{
|
||||
foreach(ref first_block; event.first_blocks)
|
||||
|
|
@ -133,23 +133,11 @@ package struct EventManager
|
|||
|
||||
private void disposeData() nothrow @nogc
|
||||
{
|
||||
clearEvents();
|
||||
if(events)
|
||||
{
|
||||
foreach(ref event;events)
|
||||
{
|
||||
foreach(first_block; event.first_blocks)
|
||||
{
|
||||
EventBlock* block = first_block;
|
||||
EventBlock* next_block;
|
||||
if(block)next_block = first_block.next;
|
||||
while(block)
|
||||
{
|
||||
Mallocator.dispose(block);
|
||||
block = next_block;
|
||||
if(block)next_block = block.next;
|
||||
}
|
||||
}
|
||||
|
||||
Mallocator.dispose(event.blocks);
|
||||
Mallocator.dispose(event.first_blocks);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue