Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Issue 7171001: ui/base/models: Fix the API example code comment. (Closed)

Created:
9 years, 6 months ago by tfarina
Modified:
9 years, 6 months ago
Reviewers:
sky
CC:
chromium-reviews
Visibility:
Public.

Description

ui/base/models: Fix the API example code comment. Allocating |root| on the stack and passing to |model|, also on the stack, does _not_ work, because TreeNodeModel owns the root. So when the dtor of TreeNodeModel is called, it attempts to free an invalid pointer, which was already deleted. BUG=None TEST=None R=sky@chromium.org Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=89355

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -4 lines) Patch
M ui/base/models/tree_node_model.h View 1 chunk +4 lines, -4 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
tfarina
9 years, 6 months ago (2011-06-14 23:29:55 UTC) #1
sky
What's wrong with the example the way it was? -Scott
9 years, 6 months ago (2011-06-16 16:06:45 UTC) #2
tfarina
On 2011/06/16 16:06:45, sky wrote: > What's wrong with the example the way it was? ...
9 years, 6 months ago (2011-06-16 16:13:12 UTC) #3
sky
9 years, 6 months ago (2011-06-16 16:26:39 UTC) #4
Good point. LGTM

Powered by Google App Engine
This is Rietveld 408576698