mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 10:17:22 +01:00
Revert resource management change. Doesn't work.
This commit is contained in:
parent
fe0445434f
commit
3cd9655263
1 changed files with 3 additions and 7 deletions
|
|
@ -112,16 +112,12 @@ namespace Penumbra.Interop
|
|||
|
||||
UnloadCharacterResource( oldResources[ i ] );
|
||||
|
||||
// Easiest way to actually remove a file from the resource manager.
|
||||
// Not doing this keeps them in memory for some reason,
|
||||
// and then corrupts the state when entering a loading screen that is not a teleport.
|
||||
// This increases the references of all loaded files by one temporarily, but there is extra logic for 0-references,
|
||||
// and they get loaded anew with GetResourceAsync, but this gets redirected and thus the modded resource reference is increased twice.
|
||||
// Then it reduces the refcount of all reduces by 1 again, but this time for real, so the resource gets ref count -1, leading to problems.
|
||||
// Temporary fix against crashes?
|
||||
if( handle->RefCount <= 0 )
|
||||
{
|
||||
handle->RefCount = 1;
|
||||
handle->DecRef();
|
||||
handle->IncRef();
|
||||
handle->RefCount = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue