-
Notifications
You must be signed in to change notification settings - Fork 348
Unecpected boxing on Raii. #2608
Copy link
Copy link
Open
Description
Dalamud/Dalamud/Interface/Utility/Raii/EndObjects.cs
Lines 13 to 14 in 33a7cde
| public static IEndObject Child(ImU8String strId) | |
| => new EndUnconditionally(ImGui.EndChild, ImGui.BeginChild(strId)); |
The EndUnconditionally is a struct, and the return type IEndObject is an interface which is a reference type.
Everytime it returns, it'll box the struct into a reference type.
It has some negative impact on performance.
I think it is better to return the struct itself.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels