mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-01-02 05:43:40 +01:00
Turn ImFontLocked into a class
As `ImFontLocked` utilizes a reference counter, changed it to a class so that at worst case we still got the destructor to decrease the reference count.
This commit is contained in:
parent
df89472d4c
commit
68dc16803c
5 changed files with 75 additions and 34 deletions
|
|
@ -182,7 +182,7 @@ internal abstract class FontHandle : IFontHandle
|
|||
|
||||
// Transfer the ownership of reference.
|
||||
errorMessage = null;
|
||||
return new(fontPtr, substance.DataRoot);
|
||||
return IFontHandle.ImFontLocked.Rent(fontPtr, substance.DataRoot);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue