(Keeps Hive Alive)
Go Back   The Hive Workshop - A Warcraft III Modding Site > Warcraft III Modding > World Editor Help Zone

World Editor Help Zone Need help with Blizzard's World Editor? Ask general questions about its features and use in this forum. README!

Closed Thread
 
LinkBack Thread Tools Display Modes
Old 09-30-2007, 02:20 PM   #1 (permalink)
 
Jupiterstorm's Avatar

Jump'n Bean
 
Join Date: Sep 2006
Posts: 22

Jupiterstorm is an unknown quantity at this point (0)


Exclamation Memory Leaks

I have some questions about fixing memory leaks. I am working on a big map right now that uses a bunch of looping triggers that call unit groups and use a lot of different positions. The unit group triggers are proabably where the biggest leaks are right now. I only know GUI so im not even sure I fix the leaks without jass.

Here's one of my current triggers:
GUI Trigger:
Test Alien Behavior
Events
Player - Player 1 (Red) types a chat message containing study aliens as An exact match
Conditions
Actions
Unit Group - Pick every unit in (Units owned by Player 11 (Dark Green)) and do (Unit Group - Add (Picked unit) to SearchAlien)
Unit Group - Pick every unit in (Units of type Lancer Drone) and do (Unit Group - Add (Picked unit) to LancerPatrol)
Unit Group - Pick every unit in (Units of type Kamikazee Drone) and do (Unit Group - Add (Picked unit) to KamikazeePatrol)

Here is another version of the trigger I think would fix the leaks:

GUI Trigger:
Test Alien Behavior Leaks Fixed
Events
Player - Player 1 (Red) types a chat message containing study aliens as An exact match
Conditions
Actions
Set DestroyGroup = (Units owned by Player 11 (Dark Green))
Unit Group - Pick every unit in DestroyGroup and do (Unit Group - Add (Picked unit) to SearchAlien)
Call Customscript (something in Jass that destroys udg_DestroyGroup)
Set DestroyGroup = (Units of type Lancer Drone)
Unit Group - Pick every unit in DestroyGroup and do (Unit Group - Add (Picked unit) to LancerPatrol)
Call Customscript (something in Jass that destroys udg_DestroyGroup)
Set DestroyGroup = (Units of type Kamikazee Drone)
Unit Group - Pick every unit in DestroyGroup and do (Unit Group - Add (Picked unit) to KamikazeePatrol)
Call Customscript (something in Jass that destroys udg_DestroyGroup)

Like I said though, I don't have much experience with Jass and I don't know how I would wright the custom script that destroys the unit group. If anyone has an idea of how can fix these mem leaks, please post back. My map's gonna be awsome, but I can't even play it if there's constant lag!

Last edited by Rui; 09-30-2007 at 02:40 PM..
Jupiterstorm is offline  
Old 09-30-2007, 02:39 PM   #2 (permalink)
Administrator/Director Rui
Development Director

-------------------------
 
Join Date: Jan 2005
Posts: 5,603

Rui is a glorious beacon of light (563)Rui is a glorious beacon of light (563)Rui is a glorious beacon of light (563)Rui is a glorious beacon of light (563)Rui is a glorious beacon of light (563)Rui is a glorious beacon of light (563)


You don't need to use group variables. To pick unit groups, simply use this action:
Custom Function: set bj_wantDestroyGroup = true




PS. - Use the TRIGGER tags next time.

~Post Edited
Rui is offline  
Old 09-30-2007, 05:12 PM   #3 (permalink)

iRawr
 
Join Date: Dec 2005
Posts: 8,349

PurplePoot is a splendid one to behold (807)PurplePoot is a splendid one to behold (807)PurplePoot is a splendid one to behold (807)

Paired Mapping Contest #4 Winner: Fallen Angel - Lucifer's Keep Respected User: This user has been given the respected user award. Map Development Mini-Contest #1 Winner: Stand of the Elements 

By the way, what Rui mentioned goes right before every time you use "Unit Group - Pick Every Unit in ..."
PurplePoot is offline  
Closed Thread

Bookmarks

Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Trigger] Memory Leaks? Black-Templar Triggers & Scripts 12 11-21-2007 08:37 AM
What exactly is the downside of memory leaks? Aoen Triggers & Scripts 16 02-05-2007 11:03 PM
Memory Leaks TheSonOfCulture World Editor Help Zone 2 11-05-2006 04:04 PM
memory leaks glock World Editor Help Zone 13 11-01-2005 12:47 PM
[JASS] Memory Leaks USETHEFORKS Triggers & Scripts 1 11-02-2004 03:54 PM

All times are GMT. The time now is 04:55 AM.






Your link here 
Cell Phones | Futurama Episodes | Debt Consolidation | Xbox Mod Chips | Loans
Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
Copyright©Ralle