firebase / firebase/geofire-objc

GFGeoHashQuery & GFGeoHashQueryHandle instances incrementing on each updation of GFCircleQuery

Open
#103 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Objective-C
Stars
447
Forks
183
PR merge metrics
No merged PRs in 30d

Description

GFGeoHashQuery & GFGeoHashQueryHandle instances incrementing on each updation of GFCircleQuery.

Please find the below code
Note: `circleQuery` is strongly referenced in globally.
```
if circleQuery != nil {
//updating query
let center = CLLocation(latitude: latitude, longitude: longitude)
let radius = 5
circleQuery?.center = center
circleQuery?.radius = Double(radius)
return
}

//Below code will execute only one time.
let firebaseDBRefEventLocation = SWRealtimeDBManager.DBRoot().child("eventLocation")

let center = CLLocation(latitude: latitude, longitude: longitude)
let radius = 5
circleQuery = geoFire?.query(at: center, withRadius: Double(radius))

_ = circleQuery?.observe(.keyEntered, with: { (key: String!, location: CLLocation!) in
print("Key= '\(key)', location= '\(location)'")
})
```

Am I doing anything wrong?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.