I use unique_ptr
. For creating this poiters, I use this code snippet:
template<typename T, typename ...Args>
std::unique_ptr<T> make_unique(Args&& ...args)
{
return std::unique_ptr<T>(new T(std::forward<Args>(args)...)); //line 44
}
I test my project for memory leaks with help built-in memory leak checker.
I get the following result:
Detected memory leaks!
Dumping objects ->
my_header.h(44) : {228} normal block at 0x008AD568, 8 bytes long.
Data: < > A0 CB 8A 00 01 00 00 00
my_header.h(44) : {226} normal block at 0x008AD5B8, 8 bytes long.
Data: < > 00 D6 8A 00 00 00 00 00
/////////////////this error repeats many times
Also, I use deleaker. This tool says, that there is no memory leaks.
Aucun commentaire:
Enregistrer un commentaire