SENIORCPP Telegram 2649
#вопросы_с_собеседований
Зачем нужен виртуальный деструктор?

Для того, чтобы избежать утечки ресурсов и другого неконтролируемого поведения объекта.

Без ключевого слова virtual у родительского класса Base деструктор порожденного класса не был бы вызван. Т.е. вызвался бы только ~Base():
Hello from ~Base()



tgoop.com/seniorcpp/2649
Create:
Last Update:

#вопросы_с_собеседований
Зачем нужен виртуальный деструктор?

Для того, чтобы избежать утечки ресурсов и другого неконтролируемого поведения объекта.

Без ключевого слова virtual у родительского класса Base деструктор порожденного класса не был бы вызван. Т.е. вызвался бы только ~Base():

Hello from ~Base()

BY Senior C++ Developer




Share with your friend now:
tgoop.com/seniorcpp/2649

View MORE
Open in Telegram


Telegram News

Date: |

The Channel name and bio must be no more than 255 characters long Commenting about the court's concerns about the spread of false information related to the elections, Minister Fachin noted Brazil is "facing circumstances that could put Brazil's democracy at risk." During the meeting, the information technology secretary at the TSE, Julio Valente, put forward a list of requests the court believes will disinformation. The channel also called on people to turn out for illegal assemblies and listed the things that participants should bring along with them, showing prior planning was in the works for riots. The messages also incited people to hurl toxic gas bombs at police and MTR stations, he added. When choosing the right name for your Telegram channel, use the language of your target audience. The name must sum up the essence of your channel in 1-3 words. If you’re planning to expand your Telegram audience, it makes sense to incorporate keywords into your name. 2How to set up a Telegram channel? (A step-by-step tutorial)
from us


Telegram Senior C++ Developer
FROM American