Hi,
If I try to delete the malloced pointer what can be expected
behaviour?
The code pasted along with works may be because the struct J is a POD
but don't know what are the various implications of the same.
#include <memory>
struct J
{
int i;
int j;
};
int main()
{
J* jj = (J*)malloc(sizeof(J));
delete jj;
return 0;
}
Thanks,
Sarang
--
[ See http://www.gotw.ca/resources/clcm.htm
for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]