Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

On the CTCoreMessage leaks again. #63

Open
wants to merge 1 commit into
from

Conversation

Projects
None yet
1 participant
Contributor

ghdk commented Dec 1, 2012

When a CTCoreMessage is initialized with a method that involves the mailmessage
structure, the myFields references the mailimf_single_fields of the mailmessage.
Upon deallocation, the function mailmessage_free() also releases the
substructures of the mailimf_single_fields, hence the object is released
properly. However, when the object is initialised with init, the mailmessage is
not used, and the substructures of mailimf_single_fields are leaked. This
patch fixes this issue.

This patch differs from the one i sent before in the dealloc method only.

Given the opportunity, i would like to bring up the following issue. When a
CTCoreMessage involves the mailmessage, modifying the myFields of the
object through the accessor methods after it has been initialised, corrupts the
mailmessage->msg_fields as the accessors release parts of mailimf_single_fields
which are shared between the myFields and the mailmessage->msg_fields.
I have not touched that.

When a CTCoreMessage is initialized with a method that involves the m…
…ailmessage

structure, the myFields references the mailimf_single_fields of the mailmessage.
Upon deallocation, the function mailmessage_free() also releases the
substructures of the mailimf_single_fields, hence the object is released
properly. However, when the object is initialised with init, the mailmessage is
not used, and the substructures of mailimf_single_fields are leaked. This
patch fixes this issue.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment