Closed Bug 65219 Opened 24 years ago Closed 24 years ago

Do something about nsStringRecycler and nsCStringRecycler

Categories

(Core :: XPCOM, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla0.9

People

(Reporter: dbaron, Assigned: dbaron)

References

Details

Attachments

(2 files)

We need to do something about nsStringRecycler -- right now there are a handful of users recycling their strings into it, but nobody is using it to create strings, so it's just becoming a sort of a leak, I think. In other words, a few (very few) string users call nsString::Recycle and nsCString::Recycle, and nobody calls nsString::CreateString or nsCString::CreateString. Note that this has nothing to do with the more commonly used but deprecated |Recycle| function defined in nsStr.h. It also uses static constructors that (now that I added nsDeque to the leak stats) show up on the leak stats. Unless somebody thinks this we should all start using the string recycler (and hook it up as a memory pressure observer), I propose that we get rid of it. It seems that it may well become somewhat obsolete with scc's forthcoming string changes, anyway. Any thoughts? See: http://lxr.mozilla.org/seamonkey/search?string=nsString%3A%3ARecycle http://lxr.mozilla.org/seamonkey/search?string=nsCString%3A%3ARecycle http://lxr.mozilla.org/seamonkey/search?string=CreateString
While I'm here, what's the status of nsString2x.{h,cpp}?
Attached patch patch to remove (deleted) — Splinter Review
Status: NEW → ASSIGNED
Priority: -- → P2
Target Milestone: --- → mozilla0.8
r=jag
->0.9, since I haven't heard from scc on this
Target Milestone: mozilla0.8 → mozilla0.9
nsString[2]x.[h,cpp] were never part of the build and have been CVS removed. What is the status of this patch? Stale? Still good? I'll investigate, but let me know, I'm ready to do this work immediately.
The patch has been in my tree through all the migration of files taking place underneath it. I'll attach a version against the current tree.
Attached patch patch against current tree (deleted) — Splinter Review
Looks good to me, sr=scc. If we can get an r=, I can check this in immediately. Applying it in my tree now.
r=jag
patch committed, thanks for the help dbaron :-)
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
*** Bug 57035 has been marked as a duplicate of this bug. ***
Blocks: 28221
Component: String → XPCOM
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: