Re: [AD] Two custom mouse cursor patches

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Wed, Sep 17, 2008 at 8:26 PM, Evert Glebbeek <eglebbk@xxxxxxxxxx> wrote:
> On 17 Sep 2008, at 15:20, Peter Hull wrote:
>> Good work! I'll check but my gut feel is that you've got more
>> 'retain's than 'releases' so there may be some memory issues.
>
> Could be. It has to be something like that. I think I was careful
> about keeping that consistent, but I may have snug in a retain where
> I don't need it to be "on the safe side".
There are two options
1. Don't do any retains. System cursors are fine because they're built
in. Custom cursors are managed 'externally' by the lifetime of the
ALLEGRO_CURSOR. We will need to get rid of the release on line 674
(destroy_display) At the moment I think there might be a problem if
the same custom cursor is active in two windows when it is destroyed.
2. Do a 'proper' retain/release whenever display->cursor is changed.
This is a bit more work but would solve the problem above. I've got a
patch for this and I'll post it later (I can't get to it at the
moment)

Pete




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/