Skip to content

datapack: free all elements on clear (alliedmodders#1251)#1

Merged
fengjixuchui merged 6 commits intofengjixuchui:masterfrom
alliedmodders:master
Apr 28, 2020
Merged

datapack: free all elements on clear (alliedmodders#1251)#1
fengjixuchui merged 6 commits intofengjixuchui:masterfrom
alliedmodders:master

Conversation

@fengjixuchui
Copy link
Owner

No description provided.

psychonic and others added 6 commits April 8, 2020 17:47
Replace StringToLocalUTF8 with LocalToString and memcpy to make this binary compatible and update the documentation.
* Update Function Offsets For PVKII 0.4.2.2

-Updates offsets for Linux/Win/Mac
* Update Function Offsets For PVKII 0.4.2.2

-Updates offsets for Linux/Win/Mac
-Update func sig FireOutput for Linux/Win/Mac
* Fixed memory leak

When a pack was cleared or destroyed the String and Raw types could cause memory leaks. This happens when "position" is sitting at the end of the vector and can never get past the "if (pos >= elements.length())" statement. This means there is a memory leak in any plugin that clears/destroys a pack with strings and doesn't set the position to length-1 or less beforehand.

* datapack: Fix delete op on CDataPackType::Raw.

Co-authored-by: Kyle Sanderson <[email protected]>
@fengjixuchui fengjixuchui merged commit 97e84a4 into fengjixuchui:master Apr 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants