On Friday, 4 de November de 2011 10:15:54 André Somers wrote:
> The more I think about it, the more I think it is important to fix this:
> who is responsible for the lifetime of the QDnsReply object?
>
> This API does not make that clear. I like the pattern in itself (also in
> QNAM), but I do think it would be an improvement if we were to use a shared
> pointer to the reply object. That at least makes clear who has ownership of
> the object, and prevents memory leaks when people don't realize they are
> supposed to delete the object.

Maybe we should pattern this class against something that is already known:

http://doc.qt.nokia.com/latest/q3dns.html

This class is both the request and the reply and its ownership is clearly
known.
--
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
     Intel Sweden AB - Registration Number: 556189-6027
     Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to