[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] Subtle Memory Bug
- To: pygame-users@xxxxxxxx
- Subject: Re: [pygame] Subtle Memory Bug
- From: James Hofmann <jwhinfinity@xxxxxxxxx>
- Date: Tue, 11 Jul 2006 00:43:20 -0700 (PDT)
- Delivered-to: archiver@seul.org
- Delivered-to: pygame-users-outgoing@seul.org
- Delivered-to: pygame-users@seul.org
- Delivery-date: Tue, 11 Jul 2006 03:43:28 -0400
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=teMYQTy+6fvLuZrW2Ad1ELnBjnMfwH1ccw7C+SUiSW2cuN1y/Eg8amr8XV6R5g2xlWMj2iuMSotOGoCb0zc720kTVktsPkDUAbZOIk8IpoYAgK8/8joS93E1LzGvU8CRcewJcNtYpQlMpIRpwZ8bZqy/4EDMdgLo9SKrYELS+lw= ;
- In-reply-to: <4F2C96EF-F866-434E-AEDC-C7C42B7F8E93@redivi.com>
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
> I'd create a new alltribes dict on every generation.
> It'd be faster
> than what you're doing now, be more deterministic,
> and a lot easier
> to get right.
>
> I wouldn't classify this as a memory bug either. It
> doesn't really
> have anything to do with memory.
>
> -bob
>
I'd agree. I've been in similar situations before.
What's really wanted(once the problem is discovered)
are these two properties:
1. references to list locations, rather than specific
items
2. can "step backwards" when size/ordering changes
I tend to use a while loop and counter for those purposes.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com