Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!bu.edu!m2c!umvlsi!umvlsi.ecs.umass.edu From: jog@umvlsi.ecs.umass.edu (Ashwini ) Newsgroups: comp.lang.c++ Subject: Beginner's Problem Ref:Deallocation of space Message-ID: <1719@umvlsi.ecs.umass.edu> Date: 19 Mar 91 16:59:56 GMT Sender: jog@umvlsi.ecs.umass.edu Organization: University of Massachusetts, Amherst Lines: 30 Hi Netters, I'm sure this is a beginners problem, but i cant find any solution so I hope one of you can help me out. I have created an array int *pdata = new int[100] ; somewhere else i want to free all that space. If I use the following code int *tmp ; while(pdata){ tmp = pdata + 1; delete data ; data = tmp ; } I get the the following error :- malloc/free/realloc: clobbered space detected Illegal instruction (core dumped) Is it that if I had said instead "delete pdata", the whole array would be destroyed? Thanks a lot in advance. ashwini jog@umvlsi.umass.edu