axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lilantha Darshana (JIRA)" <axis-c-...@ws.apache.org>
Subject [jira] Commented: (AXISCPP-149) Memory cleaning of generated C++ array code
Date Mon, 10 Jan 2005 15:49:12 GMT
     [ http://issues.apache.org/jira/browse/AXISCPP-149?page=comments#action_57475 ]
     
Lilantha Darshana commented on AXISCPP-149:
-------------------------------------------

I don't know what you folks thinks about this matter. Because, struct and classes are almost
same in C++, with exceptions like of all defined members of struct are public. Therefore,
we do not need converting generated struct to clases, rather we can introduce a destructor
to the struct itself like:

typedef struct SOAPStruct_ArrayTag 
{ 
    SOAPStruct* m_Array; 
    int m_Size; 
    ~SOAPStruct_ArrayTag(){
	delete [] m_Array;
     }

} SOAPStruct_Array; 

Further to the comment on this issues about inheritance. struct support inheritance but with
some limitations due to all public members of the base class, you would not able to hide anything
from derived clases.


> Memory cleaning of generated C++ array code
> -------------------------------------------
>
>          Key: AXISCPP-149
>          URL: http://issues.apache.org/jira/browse/AXISCPP-149
>      Project: Axis-C++
>         Type: Improvement
>   Components: WSDL processing
>     Versions: 1.3 Final
>  Environment: All Platforms
>     Reporter: Samisa Abeysinghe
>     Assignee: Mark Whitlock
>      Fix For: 1.4 Alpha

>
> In case of Arrays, I noticed that the WSDL2WS tool is generating a 
> struct.
> e.g.
> typedef struct SOAPStruct_ArrayTag
> {
>         SOAPStruct* m_Array;
>         int m_Size;
> } SOAPStruct_Array;
> The trouble here is that in case of returned values/parameters the user 
> has to delete the m_Array mamber explicitly.
> I think a more cleaner way would be to use a class here and use a 
> destructor to clean memory.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


Mime
View raw message