[Freeciv-Dev] Re: (PR#6898) leaks in game_load / player_load
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: |
undisclosed-recipients: ; |
Subject: |
[Freeciv-Dev] Re: (PR#6898) leaks in game_load / player_load |
From: |
"Benoit Hudson" <bh@xxxxxxxxxxxxxxxxxxx> |
Date: |
Tue, 18 Nov 2003 13:33:35 -0800 |
Reply-to: |
rt@xxxxxxxxxxx |
<URL: http://rt.freeciv.org/Ticket/Display.html?id=6898 >
On Tue, Nov 18, 2003 at 01:17:55PM -0800, Jason Short wrote:
> That was my thought as well. But the player array is a *currently* a
> statically declared array, meaning all its pointers are initialized to NULL.
>
> If this change is done, though, a comment should be added to the players
> array to alert anyone thinking to change it in future.
That seems like a very bad thing to rely on. In my experience, whenever
I rely on something like that it comes out and bites me; so I memset and
calloc all the time.
Then again, my attitude would be why compiler researchers get good
results with ideas like "hey, we can optimize away all these writes
because they're writing zero to locations we know already hold zero!"
-- Benoît
|
|