Memory leaks report on pluck
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 20/100
Research direction
Start by reproducing the two reported cases around db.pluck(expression) with Instruments, comparing the version with the row access and update against the commented version. Trace whether the reported allocations originate in SQLite.swift or the caller’s query and update usage. Done means identifying a reproducible leak cause and documenting or fixing it with evidence from the Instruments reports.
Written by the indexing model from the issue text.
Description
Hello. Thank you for great tool.
I have question about instruments report.
I have question about query, reported as leaked in instruments
if let row = db.pluck(expression) {
//word = row[c_word]
//let now = NSDate().timeIntervalSince1970
//try db.run(t_words.filter(c_id == row[c_id]).update(c_ai_used_at <- now))
}
if all lines in if block commented, this is how instruments report looks like:
if let row = db.pluck(expression) {
word = row[c_word]
let now = NSDate().timeIntervalSince1970
try db.run(t_words.filter(c_id == row[c_id]).update(c_ai_used_at <- now))
}
if all lines in if block uncommented, this is how instruments report looks like:
Have idea what of errors in my code generate this leaks?
- Dominant language
- Swift
- Stars
- 10.2k
- Forks
- 1.6k
- Avg merge
- 6d 2h
- Merged PRs (30d)
- 2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from stephencelis/SQLite.swift
-
Difficulty 1/5 Under an hour Newbie friendliness 95/100
stephencelis/SQLite.swift#1375 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
stephencelis/SQLite.swift#1293 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 38/100
stephencelis/SQLite.swift#1347 · 7 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
stephencelis/SQLite.swift#1338 · 1 comment ·
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
stephencelis/SQLite.swift#1337 · 3 comments ·
All issues in stephencelis/SQLite.swift
Similar issues
-
tvOS
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
skiptools/skip-fuse-ui#147 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
OneBusAway/onebusaway-ios#1438 · 1 reaction ·