mirror of
				https://github.com/LonamiWebs/Telethon.git
				synced 2025-11-04 09:57:29 +03:00 
			
		
		
		
	Revert a49e50d as suggested by @cher-nov (remove __del__)
				
					
				
			__del__'s are evil because they rely on the GC
This commit is contained in:
		
							parent
							
								
									db79ff08c7
								
							
						
					
					
						commit
						c367aa9bc9
					
				| 
						 | 
					@ -43,7 +43,7 @@ class TelegramClient:
 | 
				
			||||||
    # Current TelegramClient version
 | 
					    # Current TelegramClient version
 | 
				
			||||||
    __version__ = '0.8'
 | 
					    __version__ = '0.8'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # region Default methods of class
 | 
					    # region Initialization
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __init__(self, session, api_id, api_hash, proxy=None):
 | 
					    def __init__(self, session, api_id, api_hash, proxy=None):
 | 
				
			||||||
        """Initializes the Telegram client with the specified API ID and Hash.
 | 
					        """Initializes the Telegram client with the specified API ID and Hash.
 | 
				
			||||||
| 
						 | 
					@ -82,10 +82,6 @@ class TelegramClient:
 | 
				
			||||||
        # We need to be signed in before we can listen for updates
 | 
					        # We need to be signed in before we can listen for updates
 | 
				
			||||||
        self.signed_in = False
 | 
					        self.signed_in = False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __del__(self):
 | 
					 | 
				
			||||||
        """Releases the Telegram client, performing disconnection."""
 | 
					 | 
				
			||||||
        self.disconnect()
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    # endregion
 | 
					    # endregion
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # region Connecting
 | 
					    # region Connecting
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user