Skip to content

FP: undisposed non-IDisposable timer local (Stopwatch / DispatcherTimer) flagged OWN001 #161

Description

@PhysShell

Resolved — NOT a bug (closing as invalid)

The premise of this issue was wrong: I assumed the flagged timer was a System.Diagnostics.Stopwatch (not IDisposable). It is not.

Tracing the finding from the core side resolved it: the message renders via ownir.py's rkind == "flow-local" path, whose extractor candidate gate (Program.cs ~4095) requires ImplementsIDisposable. So the extractor only flags it if the type resolves as IDisposable.

The raw source (assorted/SilverlightExtended/Page.xaml.cs) confirms why:

  • the file has no using System.Diagnostics;
  • it has using Nuxleus.Performance;
  • and it uses Stopwatch.UnitPrecision, UnitPrecision.NANOSECONDS, and (in the commented design) timer.Scope = () => {} and using (timer) { … }.

So Stopwatch is Nuxleus.Performance.Stopwatch — a custom IDisposable scope-timer (you can only using an IDisposable), not the BCL type. Stopwatch timer = new Stopwatch(); is genuinely never disposed (the disposing using (timer) block is commented out).

Verdict: TRUE POSITIVE. The extractor correctly flagged a real leak of a custom IDisposable. No precision bug exists; there is nothing to fix.

The corpus/oracle-fp-baseline.txt entry stays — reclassified from "FP" to a non-product true positive (assorted/ Silverlight demo), consistent with how the other assorted/ sample findings are baselined. Details in commit 47c46a6 and docs/notes/oracle-known-fps.md root-cause #1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions