         }
         
         override func execute() {
-            self.tracker?.preTrackActions { (error) in
+            self.tracker?.preTrackActions { [weak self] (error) in
                 if let err = error {
-                    if let c = self.completion {
+                    if let c = self?.completion {
                         c(err)
                     }
-                    self.finish()
+                    self?.finish()
                 } else {
-                    self.tracker?.store.storeEvent(event: self.event, completion: { (error) in
-                        if let c = self.completion {
-                            c(error)
-                        }
-                        self.finish()
-                    })
+                    if let strongSelf = self {
+                        strongSelf.tracker?.store.storeEvent(event: strongSelf.event, completion: { [weak self] (error) in
+                            if let c = self?.completion {
+                                c(error)
+                            }
+                            self?.finish()
+                        })
+                    }
                 }
             }
         }

    }
    
    private func flushStoreIfNecessary(limit: Int, completion: @escaping EventTrackerCompletion) {
        self.store.allEvents { (events, error) in
            if let err = error {
                completion(err)
            } else if events.count >= limit {
                self.flushStore { (error) in
                    completion(error)
                }
            } else {

        }
        
        override func execute() {
            self.tracker?.clearStore { [weak self] (error) in
                if let c = self?.completion {
                    c(error)
                }
                self?.finish()
            }
        }
    }
