Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c++ > #15362

Re: memory allocation/deaalocation in calss

From asit <lipun4u@gmail.com>
Newsgroups comp.lang.c++
Subject Re: memory allocation/deaalocation in calss
Date 2012-04-13 15:31 -0700
Organization http://groups.google.com
Message-ID <14921973.52.1334356285643.JavaMail.geo-discussion-forums@pbag4> (permalink)
References <28714271.3.1334350972034.JavaMail.geo-discussion-forums@pbcuv5>

Show all headers | View raw


On Saturday, April 14, 2012 2:32:52 AM UTC+5:30, asit wrote:
> I have a LinkedList class which has a function which allocates memory.
> 
> I need to add user defined copy constructor and assignment operator.
> 
> In case of assignment operator, I need to free the existing memory allocated(which is done by my destructor). Should I call destructor inside that assignment operator body ?

Back to comp.lang.c++ | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

memory allocation/deaalocation in calss asit <lipun4u@gmail.com> - 2012-04-13 14:02 -0700
  Re: memory allocation/deaalocation in calss "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> - 2012-04-13 23:35 +0200
  Re: memory allocation/deaalocation in calss Ian Collins <ian-news@hotmail.com> - 2012-04-14 09:36 +1200
  Re: memory allocation/deaalocation in calss Kevin McCarty <kmccarty@gmail.com> - 2012-04-13 14:35 -0700
    Re: memory allocation/deaalocation in calss Juha Nieminen <nospam@thanks.invalid> - 2012-04-14 05:27 +0000
      Re: memory allocation/deaalocation in calss Christopher Creutzig <christopher@creutzig.de> - 2012-04-26 19:46 +0200
  Re: memory allocation/deaalocation in calss asit <lipun4u@gmail.com> - 2012-04-13 15:17 -0700
    Re: memory allocation/deaalocation in calss Ian Collins <ian-news@hotmail.com> - 2012-04-14 11:29 +1200
  Re: memory allocation/deaalocation in calss asit <lipun4u@gmail.com> - 2012-04-13 15:31 -0700

csiph-web