[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kmail-devel
Subject:    Re: [PATCH] Re: Obscure but reproducable crash.
From:       Don Sanders <sanders () kde ! org>
Date:       2002-06-22 3:45:06
[Download RAW message or body]

Refcounting certainly has advantages, especially as KMail becomes more 
complicated.

On Saturday 22 June 2002 04:25, Waldo Bastian wrote:
> On Friday 21 June 2002 11:09 am, Don Sanders wrote:
> > Anyway if you feel that your fix is not complete, then this patch
> > shows the direction that I would like to go in.
>
> Well. this would fix the crashes but it doesn't fix the overall
> design problem that the lifetime management of messages is severly
> lacking. What your change does is basically replacing a pointer
> with a guarded pointer, but what would be needed is to replace it
> with a refcounting pointer so that the message doesn't get removed
> while it still in use.
>
> Take the following situation for example:
> * double click a message to get it in a separate view
> * now delete the message in the main window.
>
> This would delete the message underneath the separate view and
> there is no way that something like "Reply to" could ever work. No
> surprise that the RMB menu in that situation is currently such a
> mess.

Using refcounting wouldn't solve this problem completely as there's 
the problem of the seperate view actions depending on the current 
item in kmheaders.

Using serial numbers would still work in the above case it's not until 
the message is really deleted by eg. compacting the trash that the 
serial number becomes invalid.

It's probably worth solving the dependency on kmheaders problem first 
before refcounting kmmessage. I have more free time now so if no one 
else does it I'll get around to it eventually.

Don Sanders

_______________________________________________
KMail Developers mailing list
kmail@mail.kde.org
http://mail.kde.org/mailman/listinfo/kmail
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic