CWE-1082ΒΆ

Class Instance Self Destruction Control Element. [Bad-Coding-Practices, Improper-Adherence-To-Coding-Standards]

Required inputs: IR

The code contains a class instance that calls the method or function to delete or destroy itself.

For example, in C++, "delete this" will cause the object to delete itself.

This issue can prevent the product from running reliably. If the relevant code is reachable by an attacker, then this reliability problem might introduce a vulnerability.

Excerpts from CWE [https://cwe.mitre.org], Copyright (C) 2006-2026, the MITRE Corporation. See section 9.4. "3rd-Party Licenses" in the documentation for full details.

Possible Messages

Key

Text

Severity

Disabled

self_destruct

The code contains a class instance that calls the method or function to delete or destroy itself.

None

False

Options