Release packet after invoking initialisation method of super which

retains it.  To fix memory leaks.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@2024 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Andrew McCallum 1997-01-09 15:38:28 +00:00
parent 0fb16a7629
commit d0608bc69e

View file

@ -54,6 +54,7 @@ static BOOL debug_connected_coder = NO;
initForSendingWithCapacity: DEFAULT_SIZE initForSendingWithCapacity: DEFAULT_SIZE
replyInPort: [c inPort]]; replyInPort: [c inPort]];
[super initForWritingToStream: packet]; [super initForWritingToStream: packet];
[packet release];
connection = c; connection = c;
sequence_number = n; sequence_number = n;
identifier = i; identifier = i;
@ -161,6 +162,7 @@ static BOOL debug_connected_coder = NO;
/* Create the new ConnectedDecoder */ /* Create the new ConnectedDecoder */
cd = [self newReadingFromStream: packet]; cd = [self newReadingFromStream: packet];
[packet release];
reply_port = [packet replyPort]; reply_port = [packet replyPort];
cd->connection = [Connection newForInPort: in_port cd->connection = [Connection newForInPort: in_port
outPort: reply_port outPort: reply_port
@ -191,6 +193,7 @@ static BOOL debug_connected_coder = NO;
/* Create the new ConnectedDecoder */ /* Create the new ConnectedDecoder */
cd = [self newReadingFromStream: packet]; cd = [self newReadingFromStream: packet];
[packet release];
reply_port = [packet replyOutPort]; reply_port = [packet replyOutPort];
cd->connection = [Connection newForInPort: in_port cd->connection = [Connection newForInPort: in_port
outPort: reply_port outPort: reply_port