存在内存泄漏
- Dominant language
- Swift
- Stars
- 4.3k
- Forks
- 677
- PR merge metrics
- No merged PRs in 30d
Description
func _getBridgedPropertyList(anyClass: AnyClass) -> Set {
if !(anyClass is HandyJSON.Type) {
return []
}
var propertyList = Set()
if let superClass = class_getSuperclass(anyClass), superClass != NSObject.self {
propertyList = propertyList.union(_getBridgedPropertyList(anyClass: superClass))
}
let count = UnsafeMutablePointer.allocate(capacity: 1)
if let props = class_copyPropertyList(anyClass, count) {
for i in 0 ..< count.pointee {
let name = String(cString: property_getName(props.advanced(by: Int(i)).pointee))
propertyList.insert(name)
}
//MARK:-------------------------------
free(props)
}
//MARK:----------------------------------------------
free(count)
return propertyList
}
Contributor guide
No contributing guide indexed for this repository
Research direction
The report points to _getBridgedPropertyList(anyClass:) and its class-property enumeration and allocation calls. Start by tracing this function's callers and reproducing the reported leak with memory diagnostics; done means the leak is identified and no longer occurs in the relevant serialization path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100