Changes between Initial Version and Version 1 of Ticket #273, comment 3


Ignore:
Timestamp:
2011-03-27T06:45:52Z (13 years ago)
Author:
Petr Koupy

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #273, comment 3

    initial v1  
     1I understand the issue and have located all the dependencies. Before incorporating the fix, I request the author of the ticket to further specify the expected behaviour - mainly to clarify the sentence "map ADTs should never free the memory occupied by the mapped object". I recognize two possibilities:
     2[[BR]]
     31) All operations of map ADTs shall be strictly shallow, leaving the deallocation of contained objects to the user. As an example, user would be obliged to free all mapped objects before calling destroy operation on map ADT. Such solution would however require the user to actually remember the keys. This would ultimately result in a major surgery to some networking files and seems rather impractical.
     4[[BR]]
     52) The goal of the ticket would be redefined to the removal of inconsistency between add and remove operation (i.e. add would never cause internal deallocation). Remove and destroy operations would be provided in two versions - shallow and deep. Of course, the deep version would guarantee just a single level deallocation due to the absence of destructors. Dependent networking code would be then checked for the correct usage and possible memory leaks.