StackOverflow Questions for Tag: delete-operator

Always Confused
Always Confused

Reputation: 490

Can C++20 destroying delete be used to safely defer the destruction of an object?

Score: 2

Views: 115

Answers: 0

Read More
qiuxiafei
qiuxiafei

Reputation: 5997

Is it safe to delete a NULL pointer?

Score: 361

Views: 222600

Answers: 8

Read More
YiFei
YiFei

Reputation: 1856

ASan new_delete_type_mismatch due to over alignment

Score: 3

Views: 48

Answers: 1

Read More
DWade64
DWade64

Reputation: 427

Delete dynamically allocated memory twice?

Score: 1

Views: 635

Answers: 1

Read More
Jimbo
Jimbo

Reputation: 4515

Why is a class with copy constructor and deleted move constructor not convertible to itself?

Score: 5

Views: 104

Answers: 1

Read More
Vinícius
Vinícius

Reputation: 15746

Can I re-use a pointer in this case?

Score: 1

Views: 2967

Answers: 6

Read More
Joseph Garvin
Joseph Garvin

Reputation: 21974

Workaround for lack of destroying_delete_t in C++?

Score: 3

Views: 159

Answers: 0

Read More
MajinMilad
MajinMilad

Reputation: 13

C++ deleting array on the heap

Score: -2

Views: 2732

Answers: 2

Read More
Priya Sirohi
Priya Sirohi

Reputation: 1

Skip-lists in Data Structure

Score: 0

Views: 55

Answers: 1

Read More
ChloeCodes
ChloeCodes

Reputation: 25

How do I remove items from a JavaScript Array?

Score: 2

Views: 6684

Answers: 7

Read More
Dalibor
Dalibor

Reputation: 11

C++ delete[] crashes

Score: 0

Views: 2060

Answers: 4

Read More
Arol Nokam
Arol Nokam

Reputation: 17

delete[] isn't deleting the arrays

Score: -1

Views: 125

Answers: 1

Read More
bodacydo
bodacydo

Reputation: 79509

How do you 'realloc' in C++?

Score: 104

Views: 114489

Answers: 4

Read More
sharptooth
sharptooth

Reputation: 170529

Are there real life cases when deleting an incomplete type is not an error in C++?

Score: 3

Views: 288

Answers: 2

Read More
Xeo
Xeo

Reputation: 131837

Why is it undefined behavior to delete[] an array of derived objects via a base pointer?

Score: 41

Views: 8181

Answers: 6

Read More
Viatorus
Viatorus

Reputation: 1903

Handling required delete-operator in virtual-destructors in freestanding environments

Score: 1

Views: 96

Answers: 1

Read More
Supreme Machine
Supreme Machine

Reputation: 69

C++ Qt how to properly delete widget

Score: 0

Views: 120

Answers: 2

Read More
Libavi
Libavi

Reputation: 540

Is there a designated way to delete a pointer and set it to nullptr in C++?

Score: 3

Views: 318

Answers: 4

Read More
Manas
Manas

Reputation: 3

" heap-use-after-free" error even when I am not accessing the deleted node of a binary tree

Score: 0

Views: 42

Answers: 1

Read More
Pat O'Keefe
Pat O'Keefe

Reputation: 3493

Meaning of = delete after function declaration

Score: 349

Views: 183408

Answers: 10

Read More
PreviousPage 1Next