mirror of
				https://github.com/python/cpython.git
				synced 2025-11-04 03:44:55 +00:00 
			
		
		
		
	Strengthen the constraints on calling PyObject_GC_Fini().
This commit is contained in:
		
							parent
							
								
									6870bba459
								
							
						
					
					
						commit
						8f6df46d40
					
				
					 1 changed files with 5 additions and 0 deletions
				
			
		| 
						 | 
					@ -5029,6 +5029,11 @@ pair of rules:
 | 
				
			||||||
  objects.  The deallocator (\member{tp_dealloc} handler) should call
 | 
					  objects.  The deallocator (\member{tp_dealloc} handler) should call
 | 
				
			||||||
  this for the object before any of the fields used by the
 | 
					  this for the object before any of the fields used by the
 | 
				
			||||||
  \member{tp_traverse} handler become invalid.
 | 
					  \member{tp_traverse} handler become invalid.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  \strong{Note:}  Any container which may be referenced from another
 | 
				
			||||||
 | 
					  object reachable by the collector must itself be tracked by the
 | 
				
			||||||
 | 
					  collector, so it is generally not safe to call this function
 | 
				
			||||||
 | 
					  anywhere but in the object's deallocator.
 | 
				
			||||||
\end{cfuncdesc}
 | 
					\end{cfuncdesc}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
The \member{tp_traverse} handler accepts a function parameter of this
 | 
					The \member{tp_traverse} handler accepts a function parameter of this
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue