< Previous by Date | Date Index | Next by Date > |
Thread Index | Next in Thread > |
Recently I found that my code has a leak when creating the SDP from string. I tried to find the correct way of doing this in examples/tests but could not understand who is responsible to delete the Data pointer. For instance, I found this: WHAT PREVIOUSLY WORKED BUT NOW CORES... Data text(publishBody); HeaderFieldValue hfv(text.data(), text.size()); Mime type("application", "pidf+xml"); Pidf pc(&hfv, type); boost::shared_ptr<resip::Contents> body(&pc); .... WHAT NOW NEEDS TO BE DONE INSTEAD.. */ Data* text = new Data(publishBody); HeaderFieldValue hfv(text->data(), text->size()); Mime type("application", "pidf+xml"); Pidf* pc = new Pidf(hfv, type); boost::shared_ptr<resip::Pidf> body(pc); /* */ |