Skip to content

Change deallocation method to use free#168

Open
jordan-walters wants to merge 1 commit into
mvrdevelopment:masterfrom
jordan-walters:master
Open

Change deallocation method to use free#168
jordan-walters wants to merge 1 commit into
mvrdevelopment:masterfrom
jordan-walters:master

Conversation

@jordan-walters

@jordan-walters jordan-walters commented Jul 3, 2026

Copy link
Copy Markdown

Changed memory deallocation method from 'delete' to 'free'.
allocate uses malloc so deallocate MUST not use delete! It MUST use a matching free.

// Allocation
pointer allocate(size_type num, const void* hint = 0)
{
	return (pointer)malloc(num * sizeof(T));
}

// Deallocation
void deallocate(pointer p, size_type)
{
	free(p);
}

Changed memory deallocation method from 'delete' to 'free'.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant