- Joined
- Dec 9, 2014
- Messages
- 18
So let's say I have a function that does a simple task of creating a quest.
Now as you can see I am returning the quest local I generated, do I need to worry about this creating a memory leak? If so how could I remedy this?
I'm gonna slip in a second question real quick: Is there a performance difference between using GUI triggers, vs regular code ? I know we gain flexibility with going the code route, but I don't want to build everything using code if some is easier to do with the GUI, and there isn't a performance hit.
Code:
function questCreator (name, desc, icon, isReq)
local qst = CreateQuest()
local req = isReq or false
QuestSetTitle(qst, name)
QuestSetDescription(qst, desc)
QuestSetIconPath(qst, icon)
QuestSetRequired(qst, req)
req = nil
return qst
end
Now as you can see I am returning the quest local I generated, do I need to worry about this creating a memory leak? If so how could I remedy this?
I'm gonna slip in a second question real quick: Is there a performance difference between using GUI triggers, vs regular code ? I know we gain flexibility with going the code route, but I don't want to build everything using code if some is easier to do with the GUI, and there isn't a performance hit.