Opened 13 years ago

Closed 13 years ago

#4936 closed defect (fixed)

delete should be array delete

Reported by: Erik Hovland <erik@…> Owned by: danielk
Priority: trivial Milestone: unknown
Component: mythtv Version: head
Severity: low Keywords:
Cc: Ticket locked: no


In openglcontext.cpp, the new of a string was a [] type. That means that the corresponding delte should be [] as well. Note that g++ happens to know that strings should be deleted. But why make the compiler work so hard.

Attachments (1)

libs_libmythtv_openglcontext.cpp-remove-useless-null-check (805 bytes) - added by Erik Hovland <erik@…> 13 years ago.
changes delete to delete []

Download all attachments as: .zip

Change History (3)

Changed 13 years ago by Erik Hovland <erik@…>

changes delete to delete []

comment:1 Changed 13 years ago by danielk

Owner: changed from Isaac Richards to danielk
Status: newassigned

comment:2 Changed 13 years ago by danielk

Resolution: fixed
Status: assignedclosed

(In [16686]) Fixes #4936. Fixes some pointer use in OpenGLContext.

A pointer was referenced 3 times before checking it for null in the dtor. A pointer was used twice in SetupTexture?() before it was checked for null.

Note: See TracTickets for help on using tickets.