< Previous by Date Date Index Next by Date >
< Previous in Thread Thread Index  

Re: [reSIProcate] The use of Data Class


There are a number of reasons that VS would report leaks that are not indicative of runtime leaks - ie:  static Data variables, or static objects that contain Data instances.  Be assured that the Data class is well tested and to my knowledge is not leaking any memory itself.  For windows users I would recommend use of the following leak detection software, that offers a stack trace of each detected leak, so you can pinpoint the source of each leak:  https://vld.codeplex.com/

Also - keep in mind that a DUM based application must perform a proper shutdown in order to not leak memory at shutdown.  See the wiki or dum/test/basicClient example for more details on how to shutdown DUM applications properly.

Regards,
Scott

On Wed, Aug 19, 2015 at 3:08 AM, 许 <xubonts@xxxxxxx> wrote:
Hi, everyone.
When I use the Data class,  Detected memory leaks by using  _CrtDumpMemoryLeaks().
Like bellow:
e:\resiprocate-1.8.5\rutil\data.cxx(314) : {2230} normal block at 0x0382E588, 304 bytes long.
 Data: <     </div>     > 20 20 20 20 20 3C 2F 64 69 76 3E 0A 20 20 20 20

e:\resiprocate-1.8.5\rutil\data.cxx(346) : {2189} normal block at 0x0382CEF0, 20 bytes long.
 Data: <SimpleTargetHand> 53 69 6D 70 6C 65 54 61 72 67 65 74 48 61 6E 64 

e:\resiprocate-1.8.5\rutil\data.cxx(1093) : {2204} normal block at 0x0382D4B8, 23 bytes long.
 Data: <Proxy::mFifo er:> 50 72 6F 78 79 3A 3A 6D 46 69 66 6F 00 65 72 3A

If use lots of Data instance in the program , will it make more memory leak?
I know that we must use the Data as the function parameter is Data.
The new and delete can avoid memory leak, how can I use the Data to avoid memory leak?

Thanks for your help.