Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
this introduces a simple/cheap managed memory allocator, each allocated object is given a due/deadline time, after which the object is deallocated.
this memory manager relies on constant polling, just like the rest of the steam ecosystem, meaning that it doesn't spawn any threads and so it becomes the responsibility of the containing class.
if the containing class failed to perform this polling operation, the behavior becomes similar to simply using the
new
operator and storing the addresses (as if we were usingstd::vector<void *>
), and since the allocator stores a reference to all allocated objects at least they will be deallocated once the containing class itself is destroyed.I don't know for how long should these objects stay alive though, so I set each one to a comically large number.
used in:
Steam_Remote_Storage::GetFileNameAndSize()
(also removes the 300 chars filename limit)Steam_Matchmaking_Servers::GetServerDetails()
Steam_Remote_Storage::GetUGCDetails()
feel free to reject this PR if it seems unsafe, it's understandable that this might be problematic.