xo-object2: streamline DList gc hooks
This commit is contained in:
parent
1f05a568f5
commit
5560f84dee
1 changed files with 2 additions and 7 deletions
|
|
@ -33,7 +33,7 @@ namespace xo {
|
|||
obj<AGCObject> car,
|
||||
DList * cdr)
|
||||
{
|
||||
void * mem = mm.alloc(typeseq::id<DList>(), sizeof(DList));
|
||||
void * mem = mm.alloc_for<DList>();
|
||||
|
||||
return new (mem) DList(car, cdr);
|
||||
}
|
||||
|
|
@ -159,12 +159,7 @@ namespace xo {
|
|||
DList *
|
||||
DList::shallow_copy(obj<AAllocator> mm) const noexcept
|
||||
{
|
||||
DList * copy = (DList *)mm.alloc_copy((std::byte *)this);
|
||||
|
||||
if (copy)
|
||||
*copy = *this;
|
||||
|
||||
return copy;
|
||||
return mm.std_copy_for(this);
|
||||
}
|
||||
|
||||
auto
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue