Cheitan 33 Posted August 30, 2017 Hey there, Very quick and simple question, but I can't find any intel on it : when a group is marked for auto-deletion (eg. using deleteGroupWhenEmpty command) and is finally deleted (because I'm an excellent player and I've killed everyone !), what is the fate of waypoints that have been previously added to the group ? Are they deleted also, or are they staying somewhere in the memory ? I'm asking this because I'm designing something like an ennemy occupation script for a persistent mission on dedicated server. If the waypoints are not deleted with the group, I'm afraid that it can impact the health of the server by "flooding" the memory with useless waypoints staying the whole mission long. Any information on my question would be very appreciated. If waypoints are not automatically deleted, I will be forced to create some very dirty pieces of code in order to store references to waypoints in an array and manually delete it each time I spawn a new objective. Thanks Share this post Link to post Share on other sites
Grumpy Old Man 3545 Posted August 30, 2017 Waypoints are stored with the group, if the group is deleted so are the waypoints, as far as I know. Unless you have hundreds of thousands of waypoints for hundreds of groups I doubt waypoints are ever a performance issue. What makes you think waypoints are degrading the performance? Cheers Share this post Link to post Share on other sites
Cheitan 33 Posted August 30, 2017 I don't really think waypoints are a concern here. But as I'm designing a scenario which is supposed to run during days and days, with lots of AI spawning and deleting (and so lots of groups and waypoints), I was wondering what could happen if all this stuff was not automatically deleted. In fact, I pay much attention to every single useless detail that could be hold in memory, because in a 3h mission it's not a problem but on a persistent mission, the memory leak is amplifying all along the game. We want not to have to reboot the scenario more than one time a week. Anyway, thanks for your answer, that's good to know. Let's play around a bit with waypoints in order to make an enemy occupied city more realistic ! Share this post Link to post Share on other sites
jstibbsy 54 Posted August 30, 2017 Well units spawned in have an effect on performance so you'd probably want units only spawning in when players are nearby. Waypoints just inform them where to go and if you have less than 100 units it won't make a difference on framerate and performance. Share this post Link to post Share on other sites
Grumpy Old Man 3545 Posted August 31, 2017 8 hours ago, Cheitan said: the memory leak is amplifying all along the game. What memory leak? Cheers Share this post Link to post Share on other sites
Cheitan 33 Posted August 31, 2017 We may have up to 100 units, but it should be very uncommon. Here I was not asking a question about "active" waypoints, which means all the waypoints that are attributed to a living group. I only worry about the "old" waypoints, linked to a dead and deleted group from an ancient ennemy zone. @Grumpy Old Man said that waypoints are stored with the group and so deleted at the same time than the group itself, so I think there is no problem. So there is no memory leak. There could have been one if waypoints were not auto deleted with the group, and that's what I wanted to know :) Because after a week and a dozens of objectives spawned successively, if there were been any useless object or variable staying in the memory beause it's not deleted, the server wouldn't appreciate and the server's framerate would drop. But as I said, waypoints stored with group means that when group is deleted, its waypoints are removed. So no memory leak possible, all is good :) Share this post Link to post Share on other sites