You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So basically the reset call is gone and the default discard parameter to the KTX pool method is not replicating that logic.
I don't think it's possible to call the same reset instance method from the default discard lambda parameter.
So maybe adding an overload to the pool method without the discard parameter and without the discard(T) method override would be a good solution.
The text was updated successfully, but these errors were encountered:
czyzby
added
bug
Reports of reproducible, confirmed unexpected behaviors
assets
Issues of the ktx-assets module
labels
Jan 30, 2024
You are right, adding the reset call would be problematic even if the lambda was given a Pool receiver, since it's a protected function. However, it's pretty easy to implement - all it does is calling reset on any object implementing the Poolable interface. I'll change it so that the default discard lambda attempts to reset the Poolable objects.
It seems like #363 brought a little inconsistency in how the pool discard logic works.
This is what the original discard method looks like:
And here's KTX:
So basically the
reset
call is gone and the defaultdiscard
parameter to the KTXpool
method is not replicating that logic.I don't think it's possible to call the same
reset
instance method from the defaultdiscard
lambda parameter.So maybe adding an overload to the
pool
method without thediscard
parameter and without thediscard(T)
method override would be a good solution.The text was updated successfully, but these errors were encountered: