• Tor Lillqvist's avatar
    Avoid potentially sending message to deallocated instance · 9a06a6e6
    Tor Lillqvist yazdı
    The m_pFilterControl is always added to the m_aActiveControls list
    (see createFilterControl()), so it has been released by the loop over
    the list. So make sure to call setTarget before the loop.
    
    For some reason this doesn't normally cause sending a message to a
    deallocated instance, though. (I only noticed it when experimenting
    with if-zeroing out the creation of the user pane.) I guess this might
    mean that we actually have a leak here, if the controls in the list
    don't actually get deallocated by the release messages in the loop?
    
    Change-Id: If691f8d35bab606ce8a61f677d8e495e72a23148
    9a06a6e6
ControlHelper.mm 33.6 KB