[ 
https://issues.apache.org/jira/browse/TUSCANY-1552?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12804256#action_12804256
 ] 

Thomas Gentsch commented on TUSCANY-1552:
-----------------------------------------


Initializing "listValue" is simple, however deleting appears to be not.

DataObjectImpl::getList(...) return a ref into the SDO itself w/o any ref 
counting, which means that I cannot know within DataObjectImpl how many refs to 
listValue are out there - probably therefore the listValue is not deleted 
anywhere (and nobody dared to touch this code yet :-)

I see the following options:
a) listValue is not deleted anywhere - then all List references outside remain 
valid (however, all of them share the same DataObjectListImpl). Right now this 
is the situation.
b) listValue is deleted in the destructor of DataObjectImpl - then all refs 
outside refer to freed memory
c) In theory, best were to make DataObjectList a RefCountingPtr too, which 
however would require
   - API interface changes
   - major implementation changes
  Possibly there have been other reasons while designing it like this ???

Option b) is little effort but consequences are unclear - who uses the 
getList() function where? Internally within SDO code and user progs ...




> Severe memory leak in DataObjectImpl.
> -------------------------------------
>
>                 Key: TUSCANY-1552
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1552
>             Project: Tuscany
>          Issue Type: Bug
>          Components: C++ SDO
>    Affects Versions: Cpp-M3
>         Environment: All
>            Reporter: Albert Krzymowski
>
> Memory leak in DataObjectImpl:
> the private listValue member is never:
>  initialized, deleted, and copied properly in coping constructors.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to