Skip to content

[optimization]: use raw memory allocation - #15

Merged
HawkinWay merged 2 commits into
mainfrom
9-optimization-use-raw-memory-allocation
Jul 30, 2026
Merged

[optimization]: use raw memory allocation#15
HawkinWay merged 2 commits into
mainfrom
9-optimization-use-raw-memory-allocation

Conversation

@HawkinWay

Copy link
Copy Markdown
Owner

replace

buffer_ = new T[capacity_];

with

buffer_ = static_cast<T*>(::operator new(capacity_ * sizeof(T)));

@HawkinWay
HawkinWay merged commit a664df4 into main Jul 30, 2026
3 checks passed
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