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

Remove value types: Struct -> Class #21

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Mooshua
Copy link

@Mooshua Mooshua commented Aug 11, 2023

Unless there's a very good reason why we should have these as value types, these should be reference types.

Reference types have more features and makes it easier to use dynamic .NET (eg reflection) in the API.

@fuzzbuck
Copy link

fuzzbuck commented Aug 11, 2023

+1
If a struct allocates more than 16 bytes, or is used in an async closure it is allocated on the heap anyway.
There is no benefit to using structs over classes here, and classes give more versatility.

@MapleEve
Copy link
Contributor

This will be a huge huge redo if the communication struct is changed, so i doubt unless the gameserver itself has done the part and Oki is free, currently the part is most likely the same as it is in gameserver.

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.

4 participants