wc3campaigns
WC3C Homepage - www.wc3c.netUser Control Panel (Requires Log-In)Engage in discussions with other users and join contests in the WC3C forums!Read one of our many tutorials, ranging in difficulty from beginner to advanced!Show off your artistic talents in the WC3C Gallery!Download quality models, textures, spells (vJASS/JASS), systems, and scripts!Download maps that have passed through our rigorous approval process!

Go Back   Wc3C.net > Tutorials > Trigger (GUI)/ AI editor Tutorials
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 06-06-2004, 02:05 AM   #16
Xinlitik
User
 
Join Date: Aug 2003
Posts: 433

Xinlitik has little to show at this moment (0)

Default

Er..Temp units? You lost me. I dont think anyone mentioned temp units.
Xinlitik is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 06-06-2004, 02:22 AM   #17
-={tWiStÄr}=-
User
 
Join Date: Nov 2002
Posts: 1,108

-={tWiStÄr}=- is on a distinguished road (20)

Default

in the tut it says that another type of leak could be temporary units and special effects.. what are temporary units?
-={tWiStÄr}=- is offline   Reply With Quote
Old 06-06-2004, 04:26 AM   #18
Xinlitik
User
 
Join Date: Aug 2003
Posts: 433

Xinlitik has little to show at this moment (0)

Default

Hmmm I'm not sure. All I can tell you is that removing a unit from the game almost completely removes its memory usage. Maybe by temporary units, cubasis means units you use as dummys in spells. IE make a unit cast a storm bolt, make sure you remove it after it's been used.

BTW thanks for giving rep; I'm glad some people do.
Xinlitik is offline   Reply With Quote
Old 06-07-2004, 07:22 PM   #19
FyreDaug
The GUI God is back
 
Join Date: Oct 2002
Posts: 1,975

FyreDaug will become famous soon enough (36)FyreDaug will become famous soon enough (36)

Send a message via MSN to FyreDaug
Default

One thing that I've noticed helps maps that don't use any resurrecting abilities is to run this trigger:

Code:
Remove Dead
    Events
        Unit - A unit Dies
    Conditions
    Actions
        Unit - Remove (Triggering unit) from the game
FyreDaug is offline   Reply With Quote
Old 06-10-2004, 11:41 AM   #20
Cubasis
User


Respected User
 
Join Date: Sep 2002
Posts: 633

Submissions (1)

Cubasis is on a distinguished road (15)

Default

Yes,

That is what I ment with temp units, but then I remembered that they would get cleaned up by a trigger similarly to what Fyre posted, and my original concern was for the jass user, as he should dereference "temporary" units just as he does with locations, which is ofcourse outside the scope of this tutorial.

I do though reccomend to have like a ... 8-9 second delay before the Remove part of the death-trigger, so the body fully/semi degenerates visually.

~Cubasis
Cubasis is offline   Reply With Quote
Old 06-19-2004, 01:10 AM   #21
Wickermoon
User
 
Join Date: Jun 2004
Posts: 15

Wickermoon has little to show at this moment (0)

Default

Hello there ;) I'm new to this "getting-rid-of-memory-leaks-thing" and I've got a problem.

I want to destroy my variables I made, to clean up some memory, in-game, which I don't use anymore. But everytime I try (with Custom Script call DestroyVariable / DestroyQuestItem), the Editor says, that he expects a function. So could anybody give me a reference to all functions in WCIII available or at least the function I require, please?

call QuestItemSetCompletedBJ( udg_BarrenPlantsRequired, true )

That's the line, were he sets the QuestItem to Complete, so I tried to extrapolate the function, but, as it seems, my guess was totally wrong :(
Wickermoon is offline   Reply With Quote
Old 06-19-2004, 01:53 AM   #22
-={tWiStÄr}=-
User
 
Join Date: Nov 2002
Posts: 1,108

-={tWiStÄr}=- is on a distinguished road (20)

Default

lol.. i love how u refer to the editor as "he". and i dont think quest items would cause leakage.
and plus, quest arent common so... u dont need to worry bout it.
-={tWiStÄr}=- is offline   Reply With Quote
Old 06-19-2004, 12:23 PM   #23
Wickermoon
User
 
Join Date: Jun 2004
Posts: 15

Wickermoon has little to show at this moment (0)

Default

Well, I've got a very intimate relationship with my Editor :D:D:D:D:D and thanks for the reply, but, does your post mean that, if I'm going to make a singleplayer campaign, that I don't need to pay too much attention to memory leaks?
Wickermoon is offline   Reply With Quote
Old 06-19-2004, 01:12 PM   #24
0siris[GoE]
User
 
Join Date: Apr 2003
Posts: 53

0siris[GoE] has little to show at this moment (0)

Default

His post means that a QuestItem won't create a serious memory leak because it's not used very often.
0siris[GoE] is offline   Reply With Quote
Old 06-19-2004, 03:48 PM   #25
Wickermoon
User
 
Join Date: Jun 2004
Posts: 15

Wickermoon has little to show at this moment (0)

Default

Well...there are 50 Barren Plants, but okay, if you say so ^_^
Wickermoon is offline   Reply With Quote
Old 06-19-2004, 04:34 PM   #26
Aiursrage2k
User
 
Join Date: Sep 2002
Posts: 263

Aiursrage2k has little to show at this moment (0)

Default

If you set a unit to null in hopes of getting memory back you are infact doing nothing. Using a toaster to keep your meat cold does not work and neither does this.
Aiursrage2k is offline   Reply With Quote
Old 06-19-2004, 05:15 PM   #27
Wickermoon
User
 
Join Date: Jun 2004
Posts: 15

Wickermoon has little to show at this moment (0)

Default

unit to null? I wanted to destroy some variables, which I'll never use afterwards ;)
Wickermoon is offline   Reply With Quote
Old 06-19-2004, 06:14 PM   #28
Xinlitik
User
 
Join Date: Aug 2003
Posts: 433

Xinlitik has little to show at this moment (0)

Default

With local variables too? I saw lots of people doing it, namely alphadisjunction, so I started to do it. I thought that local variables worked a bit differently from globals...
Xinlitik is offline   Reply With Quote
Old 06-20-2004, 03:30 PM   #29
Cubasis
User


Respected User
 
Join Date: Sep 2002
Posts: 633

Submissions (1)

Cubasis is on a distinguished road (15)

Default

Quest Items get destroyed when you destroy the Quest (not really proven, but likely).

Here are a couple of destroy-function-names:

RemoveLocation // Points
RemoveRect // WE "regions", the thing you place in WE.
RemoveRegion //Don't confuse this with rect, this is not what you work with in WE.
RemoveWeatherEffect
DestroyBoolExpr // Condition or Filter
DestroyEffect //Special Effect
DestroyFogModifier //Visibility Modifyer
DestroyForce //Player Group
DestroyGroup //Unit Group
DestroyLeaderboard
DestroyMultiboard
DestroyQuest
DestroyTextTag //Floating Text
DestroyTimer
DestroyTimerDialog
DestroyTrigger


And if you "are" working with JASS and/or local variables... You come to a new kind of memory leak. Basicly, what you want to do, is ... whenever you create a local handle variable (Handle = Anything except: Integer, Real, String, Boolean), you will want to set it too null at the end of the function. This is only important for stuff that you create temporarely, like locations and groups, but can also apply to units. But you should not worry about setting your Hero local variable to null, as it will exist the complete game, and generally you don't really need to set unit variables to null. But there is nothing wrong with it.

~Cubasis
Cubasis is offline   Reply With Quote
Old 06-28-2004, 04:27 AM   #30
zxzxlch
User
 
Join Date: Apr 2004
Posts: 6

zxzxlch has little to show at this moment (0)

Default

Quote:
Originally Posted by Xinlitik
As far as I know, that doesnt leak. It returns a unit. However, GetSpellAbility(was it with or without the ability.. forgot)TargetLoc() does leak.. that returns a location.

Does that apply to the similar GUI function too? So based on that, "Position of triggering unit" and "Target point of ability being cast" leaks too? Is there anyway to fix those leaks?
zxzxlch is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT. The time now is 01:07 PM.


Affiliates
The Hubb The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

Powered by vBulletin (Copyright ©2000 - 2019, Jelsoft Enterprises Ltd).
Hosted by www.OICcam.com
IT Support and Services provided by Executive IT Services