axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Susantha Kumara <susan...@opensource.lk>
Subject Re: Problems with deleting void*
Date Mon, 20 Dec 2004 11:24:53 GMT
Samisa Abeysinghe wrote:

>Hi All,
>    In the SoapDeSerializer class, I get the following warning when
>compiling. I fixed similar warnings at other places in the same class
>prior to the release of 1.4 Alpha, but could not fix these few, as
>there is no knowlege of the types that we are dealing with in this
>scope.
>The warning is as follows:
>SoapDeSerializer.cpp: In member function `virtual axiscpp::Axis_Array
>   axiscpp::SoapDeSerializer::getCmplxArray(void*, void*, void*, void*, const
>   char*, const char*)':
>SoapDeSerializer.cpp:606: warning: deleting `void*' is undefined
>SoapDeSerializer.cpp:631: warning: deleting `void*' is undefined
>SoapDeSerializer.cpp:672: warning: deleting `void*' is undefined
>
>I think it is importat to fix this, as even though it is a warning, it
>says, "deleting `void*' is undefined". This may well mean that the
>runtime is not doing anything (or may be the compiler is fooling us
>;-) )
>
>Any ideas on how to fix this?
>
>Thanks,
>Samisa...
>
>
>  
>
Could you please use following 3 lines

                ((AXIS_OBJECT_DELETE_FUNCT) pDelFunct) (Array.m_Array, 
true, Array.m_Size);
                Array.m_Array = 0;
                Array.m_Size = 0;

instead of ,

                    delete[]Array.m_Array;
                    Array.m_Size = 0;

That is the intended way to deallocate any memory of complex type 
objects allocated using  AXIS_OBJECT_CREATE_FUNCT.

Thanks,

Susantha.

Mime
View raw message