Re: Newbie : Garbage Collection of Sequences (Server Side)



OOps I was wrong, it hasn't cleaned up the memory allocated, currently the 
method reads like this:-

CORBA_sequence_CORBA_string *
 get_StringSequence(PortableServer_Servant servant,CORBA_Environment *ev)
 {

         int count;
          CORBA_sequence_CORBA_string *sequence;

          sequence=CORBA_sequence_CORBA_string__alloc();
         sequence->_buffer=CORBA_sequence_CORBA_string_allocbuf(10000);
          sequence->_length=1000;

         for(count=0;count<1000;++count){
                sequence->_buffer[count] = CORBA_string_dup ("Hello World\n");
        }          
       CORBA_sequence_set_release (sequence, TRUE);   
      return sequence;
}


The marshalling and demarshalling is being called in skels, but it still 
doesn't release the memory set in the sequence->_buffer. 
Should I alter skels at all?


claude




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]