|  | @@ -36,6 +36,15 @@ func NewSendingWindow(size uint32, writer SegmentWriter, onPacketLoss func(uint3
 | 
											
												
													
														|  |  	return window
 |  |  	return window
 | 
											
												
													
														|  |  }
 |  |  }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | 
 |  | +func (this *SendingWindow) Release() {
 | 
											
												
													
														|  | 
 |  | +	if this == nil {
 | 
											
												
													
														|  | 
 |  | +		return
 | 
											
												
													
														|  | 
 |  | +	}
 | 
											
												
													
														|  | 
 |  | +	for _, seg := range this.data {
 | 
											
												
													
														|  | 
 |  | +		seg.Release()
 | 
											
												
													
														|  | 
 |  | +	}
 | 
											
												
													
														|  | 
 |  | +}
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |  func (this *SendingWindow) Len() int {
 |  |  func (this *SendingWindow) Len() int {
 | 
											
												
													
														|  |  	return int(this.len)
 |  |  	return int(this.len)
 | 
											
												
													
														|  |  }
 |  |  }
 | 
											
										
											
												
													
														|  | @@ -192,6 +201,10 @@ func NewSendingWorker(kcp *Connection) *SendingWorker {
 | 
											
												
													
														|  |  	return worker
 |  |  	return worker
 | 
											
												
													
														|  |  }
 |  |  }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | 
 |  | +func (this *SendingWorker) Release() {
 | 
											
												
													
														|  | 
 |  | +	this.window.Release()
 | 
											
												
													
														|  | 
 |  | +}
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |  func (this *SendingWorker) ProcessReceivingNext(nextNumber uint32) {
 |  |  func (this *SendingWorker) ProcessReceivingNext(nextNumber uint32) {
 | 
											
												
													
														|  |  	this.Lock()
 |  |  	this.Lock()
 | 
											
												
													
														|  |  	defer this.Unlock()
 |  |  	defer this.Unlock()
 |