Ticket #663 (closed bug: fixed)

Opened 6 years ago

Last modified 6 years ago

src/pmc.c:pmc_free() is unused

Reported by: whiteknight Owned by:
Priority: normal Milestone: 1.3
Component: none Version: 1.1.0
Severity: medium Keywords:
Cc: Language:
Patch status: Platform:

Description

The function pmc_free() in src/pmc.c is currently unused. Besides that, I don't think it does the right thing anyway: it doesnt call the destroy VTABLE for types that need it before returning the header to the GC.

In general, I don't think we should have any cases where PMCs are explicitly freed, the GC should be handling that so we don't end up with cases where things are pointing to a PMC that has been recycled. I suggest we delete this function outright. Since it isn't used from anywhere and since it doesn't work anyway (so nobody should be relying on it) I don't know if we need a deprecation cycle for it.

Change History

follow-up: ↓ 2   Changed 6 years ago by coke

ISTR cases where chromatic has added temporary PMC usage; I wonder how this relates.

in reply to: ↑ 1   Changed 6 years ago by bacek

Replying to coke:

ISTR cases where chromatic has added temporary PMC usage; I wonder how this relates.

It uses temporary_pmc_free.

  Changed 6 years ago by NotFound

  • status changed from new to closed
  • resolution set to fixed

pmc_free is static, no need for a deprecation cycle.

Dropped in r39146, closing ticket.

Note: See TracTickets for help on using tickets.