• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

Flushing Parent hashtable question

Status
Not open for further replies.
Level 13
Joined
Jan 2, 2016
Messages
978
Last time I was flushing a parent hashtable - I couldn't save any values in that hashtable anymore. It was like the hashtable was destroyed.

So I need to ask - what do I need to do to be able to re-fill a hashtable, which parent has been flushed?
 
yeah, but I was talking about native FlushParentHashtable takes hashtable table returns nothing
I haven't had any problems with FlushChildHashtable, but last time I used FlushParentHashtable - the table became unuseable.
(It took me a lot of tests till I figured out what was wrong :D)
 
yeah, but I was talking about native FlushParentHashtable takes hashtable table returns nothing
I haven't had any problems with FlushChildHashtable, but last time I used FlushParentHashtable - the table became unuseable.
(It took me a lot of tests till I figured out what was wrong :D)

You never use FlushParentHashtable. At least I have not found any use for it, and I use hashtables for every system I create.
 
As far as I know, FlushParentHashtable() will "destroy" the hashtable. You will have to re-initialize it if you want to use it.

EDIT: Confirmed by Nestharus

I see (suspected as much)
However, since there is a limit of 256 hashtables.
Does "FlushParentHashtable" free up space?
Like.. if you have 256 tables, and you flush the parent of one, will you be able to re-create it, or does it reduce the limit of hashtables you can have?
 
I see (suspected as much)
However, since there is a limit of 256 hashtables.
Does "FlushParentHashtable" free up space?
Like.. if you have 256 tables, and you flush the parent of one, will you be able to re-create it, or does it reduce the limit of hashtables you can have?

Yes. FlushParentHashtable basically deletes the hashtable. For the situation you described, you would be able to re-create it.

Systems like "Table" partitions keys so that you really only need to use one hashtable for your entire map (they perform quite well even with a lot of entries). But there isn't anything wrong with using a bunch of hashtables. You usually won't need to destroy them though--unless you want to quickly clear all entries.
 
Status
Not open for further replies.
Back
Top