Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DtNavMeshQuery allocation fixes #83

Merged
merged 3 commits into from
Nov 21, 2024

Conversation

wrenge
Copy link
Contributor

@wrenge wrenge commented Nov 12, 2024

I replaced array allocation with rented buffer. However there's still an issue. RcRentedArray is a class. So making new instance will allocate memory in heap. Making it a struct will solve the issue. I didn't because it will break tests.

Instances of IDtPolyQuery are also allocating every frame. Would be better to turn them structs. Then make all methods accepting queries to be generic. It is more risky change.

wrenge added 3 commits November 12, 2024 16:04
…uffer rent in query.

(cherry picked from commit c8104cec4dd2f3a480720052ddba17cfc6b4fb56)
(cherry picked from commit 6fe6844efdc880c5695136f24f349908e204c07d)
(cherry picked from commit ff930712ee2c806753f39b7565f50e03a988691f)
@ikpil ikpil changed the base branch from main to pr/query-alloc-fixes November 21, 2024 14:03
@ikpil ikpil marked this pull request as ready for review November 21, 2024 14:03
@ikpil ikpil merged commit 24b8a68 into ikpil:pr/query-alloc-fixes Nov 21, 2024
2 checks passed
@wrenge
Copy link
Contributor Author

wrenge commented Nov 21, 2024

Uhh, this PR wasn't finished yet ^^'
It was draft because of that. I will post more changes in next PR later.

@ikpil
Copy link
Owner

ikpil commented Nov 26, 2024

Got it. Thank you for your contribution.

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.

2 participants