1 diff -dur freewheeling-4a03065f9d2f520cbd37dd560b4cae5685418153.orig/src/fweelin_block.cc freewheeling-4a03065f9d2f520cbd37dd560b4cae5685418153/src/fweelin_block.cc
2 --- freewheeling-4a03065f9d2f520cbd37dd560b4cae5685418153.orig/src/fweelin_block.cc 2017-02-24 19:47:23.000000000 +0100
3 +++ freewheeling-4a03065f9d2f520cbd37dd560b4cae5685418153/src/fweelin_block.cc 2017-03-17 11:14:39.000000000 +0100
5 BlockExtendedData *curxt = cur->xt;
7 BlockExtendedData *tmpxt = curxt->next;
9 + if (curxt->GetType() == T_BED_ExtraChannel)
10 + ((BED_ExtraChannel *)curxt)->RTDelete();
16 diff -dur freewheeling-4a03065f9d2f520cbd37dd560b4cae5685418153.orig/src/fweelin_mem.h freewheeling-4a03065f9d2f520cbd37dd560b4cae5685418153/src/fweelin_mem.h
17 --- freewheeling-4a03065f9d2f520cbd37dd560b4cae5685418153.orig/src/fweelin_mem.h 2017-02-24 19:47:23.000000000 +0100
18 +++ freewheeling-4a03065f9d2f520cbd37dd560b4cae5685418153/src/fweelin_mem.h 2017-03-17 11:12:46.000000000 +0100
22 void operator delete(void *d) {
23 - //printf("ERROR: Preallocated type can not be deleted directly\n");
26 - // We used to give an error message-
27 - // now we pass this delete on to RTDelete
28 - ((Preallocated *) d)->RTDelete();
29 + // cannot pass to RTDelete as this would end with two delete executed
30 + // and destructor called twice
31 + printf("ERROR: Preallocated type can not be deleted directly\n");
35 // Realtime-safe function to get a new instance of this class