• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

[vJASS] (How do you) Pinpoint DoubleFrees

Status
Not open for further replies.
Level 13
Joined
Jul 26, 2008
Messages
1,009
I've got a DoubleFree error on my TimerUtils.

It seems to happen after a unit casts a spell and is removed from the map.

Unfortunately the only error message is "Warning: ReleaseTimer: Double free!"

Is there a way to detect what is causing this so that my timers don't slowly overflow and stop working after X hours into the game?
 
Level 14
Joined
Nov 18, 2007
Messages
1,084
A double free shouldn't make your timers stop working. The error just means that you're releasing a timer twice, making it a useless function call.
JASS:
// Example 
local timer tim = NewTimer()
call ReleaseTimer(tim)
call ReleaseTimer(tim)
Generally, a double free won't look like this. You've probably released the timer in two different places of the code.
 
Status
Not open for further replies.
Top