diff --git a/addons/sourcemod/scripting/include/shavit/mapchooser.inc b/addons/sourcemod/scripting/include/shavit/mapchooser.inc index 79861a2e..bf5ffb4a 100644 --- a/addons/sourcemod/scripting/include/shavit/mapchooser.inc +++ b/addons/sourcemod/scripting/include/shavit/mapchooser.inc @@ -52,14 +52,14 @@ forward void SMC_OnSuccesfulRTV(); /** * Returns the ArrayList of maps currently on rotation. * - * @return The ArrayList of Maps + * @return The ArrayList of Maps. Don't delete this handle. */ native ArrayList Shavit_GetMapsArrayList(); /** * Returns the StringMap of maps currently on rotation. * - * @return the StringMap of maps + * @return the StringMap of maps. Don't delete this handle. */ native StringMap Shavit_GetMapsStringMap(); diff --git a/addons/sourcemod/scripting/include/shavit/replay-playback.inc b/addons/sourcemod/scripting/include/shavit/replay-playback.inc index 60b09a2d..dad23520 100644 --- a/addons/sourcemod/scripting/include/shavit/replay-playback.inc +++ b/addons/sourcemod/scripting/include/shavit/replay-playback.inc @@ -215,7 +215,8 @@ native int Shavit_GetReplayCachePostFrames(int bot); * @param style Style. * @param track Track. * @param cheapCloneHandle False means we duplicate the frames (ArrayList.Clone). True means we clone the handle to the frames (CloneHandle). - * @return ArrayList with proper replay data, or null if there is no recorded data. + * + * @return ArrayList with proper replay data, or null if there is no recorded data. Delete this handle when you're done with it. */ native ArrayList Shavit_GetReplayFrames(int style, int track, bool cheapCloneHandle=false); diff --git a/addons/sourcemod/scripting/include/shavit/replay-recorder.inc b/addons/sourcemod/scripting/include/shavit/replay-recorder.inc index 8ed97a09..7a84f10b 100644 --- a/addons/sourcemod/scripting/include/shavit/replay-recorder.inc +++ b/addons/sourcemod/scripting/include/shavit/replay-recorder.inc @@ -121,7 +121,7 @@ native void Shavit_SetReplayData(int client, ArrayList data, bool cheapCloneHand * @param client Client index. * @param cheapCloneHandle False means we duplicate the frames (Arraylist.Clone). True means we clone the handle to the frames (CloneHandle). This is going to be used for peristent-data in shavit-misc so we don't allocate duplicate memory needlessly. * - * @return ArrayList with proper replay data, or null if the player has no recorded data. + * @return ArrayList with proper replay data, or null if the player has no recorded data. Delete this handle when you're done with it. */ native ArrayList Shavit_GetReplayData(int client, bool cheapCloneHandle=false); diff --git a/addons/sourcemod/scripting/shavit-mapchooser.sp b/addons/sourcemod/scripting/shavit-mapchooser.sp index 86019c8b..621e28f6 100644 --- a/addons/sourcemod/scripting/shavit-mapchooser.sp +++ b/addons/sourcemod/scripting/shavit-mapchooser.sp @@ -2315,10 +2315,10 @@ void DebugPrint(const char[] message, any ...) public any Native_GetMapsArrayList(Handle plugin, int numParams) { - return CloneHandle(g_aMapList, plugin); + return g_aMapList; } public any Native_GetMapsStringMap(Handle plugin, int numParams) { - return CloneHandle(g_mMapList, plugin); + return g_mMapList; } diff --git a/addons/sourcemod/scripting/shavit-stats.sp b/addons/sourcemod/scripting/shavit-stats.sp index 211f6190..e5309dde 100644 --- a/addons/sourcemod/scripting/shavit-stats.sp +++ b/addons/sourcemod/scripting/shavit-stats.sp @@ -821,8 +821,6 @@ public void OpenStatsMenu_Mapchooser_Callback(Database db, DBResultSet results, maps_and_completions[blah][track>0?1:0] += 1; } - delete mapchooser_maps; - data.WriteCell(maps_and_completions[0][0], true); data.WriteCell(maps_and_completions[0][1], true); data.WriteCell(maps_and_completions[1][0], true); @@ -1271,8 +1269,6 @@ public void ShowMapsCallback(Database db, DBResultSet results, const char[] erro menu.AddItem(sRecordID, sDisplay); } - delete mapchooser_maps; - if(gI_MapType[client] == MAPSDONE) { menu.SetTitle("%T (%s)", "MapsDoneFor", client, gS_StyleStrings[gI_Style[client]].sShortName, gS_TargetName[client], rows, sTrack);