mirror of
				https://github.com/ossrs/srs.git
				synced 2025-03-09 15:49:59 +00:00 
			
		
		
		
	for #515, use srs_freepa to free the array.
This commit is contained in:
		
							parent
							
								
									ef00005ab4
								
							
						
					
					
						commit
						2af7749771
					
				
					 16 changed files with 69 additions and 64 deletions
				
			
		| 
						 | 
				
			
			@ -103,9 +103,14 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 | 
			
		|||
        p = NULL; \
 | 
			
		||||
    } \
 | 
			
		||||
    (void)0
 | 
			
		||||
// sometimes, the freepa is useless,
 | 
			
		||||
// it's recomments to free each elem explicit.
 | 
			
		||||
// so we remove the srs_freepa utility.
 | 
			
		||||
// please use the freepa(T[]) to free an array,
 | 
			
		||||
// or the behavior is undefined.
 | 
			
		||||
#define srs_freepa(pa) \
 | 
			
		||||
    if (pa) { \
 | 
			
		||||
        delete[] pa; \
 | 
			
		||||
        pa = NULL; \
 | 
			
		||||
    } \
 | 
			
		||||
    (void)0
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
* disable copy constructor of class,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue