Дисклеймер: речь идёт об однопоточном коде, оставим ужасы параллельного исполнения за скобками. Также не рассматривается возможность overrelease.
Объект точно не ритейнится на время выполнения его метода, пруфы:
| alias: "System Notifications" | |
| description: "Sends persistent notifications to the companion app" | |
| triggers: | |
| - trigger: persistent_notification | |
| update_type: | |
| - added | |
| - removed | |
| - updated | |
| notification_id: "" | |
| conditions: [] |
| class ViewModel { | |
| init() { | |
| // accessing underlying subject: | |
| $buttonTapped | |
| .asObservable() | |
| ... | |
| } | |
| // look ma, no explicit subject property |
Дисклеймер: речь идёт об однопоточном коде, оставим ужасы параллельного исполнения за скобками. Также не рассматривается возможность overrelease.
Объект точно не ритейнится на время выполнения его метода, пруфы:
| #import <Foundation/Foundation.h> | |
| @interface Node: NSObject | |
| @property (nonatomic, weak) Node *parent; | |
| @property (nonatomic) NSArray *children; | |
| @end | |
| @implementation Node { |
| import Foundation | |
| class Child { | |
| deinit { | |
| print("Child.deinit") | |
| } | |
| var parent: Parent? | |
| func removeFromParent() { |
| class Cmake < Formula | |
| desc "Cross-platform make" | |
| homepage "https://www.cmake.org/" | |
| url "https://cmake.org/files/v3.12/cmake-3.12.4.tar.gz" | |
| sha256 "5255584bfd043eb717562cff8942d472f1c0e4679c4941d84baadaa9b28e3194" | |
| head "https://cmake.org/cmake.git" | |
| bottle do | |
| cellar :any_skip_relocation | |
| sha256 "7bcd5ae043d2a6fd5983b026ccdc70b7594e0dbe9de4d367cfcead7edf3c8596" => :mojave |
| protocol RemoteAPIDelegate: class { | |
| func remoteAPIDidLoadPosts(_ posts: NSArray) | |
| } | |
| class RemoteAPI { | |
| weak var delegate: RemoteAPIDelegate? | |
| func loadPosts() { |
| protocol ReachabilityDelegate: class { | |
| func reachabilityDidChange(_ reachable: Bool) | |
| } | |
| class Reachability { | |
| weak var delegate: ReachabilityDelegate? | |
| } | |
| class Model: ReachabilityDelegate { | |
| func reachabilityDidChange(_ reachable: Bool) { |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>IDECodeSnippetCompletionPrefix</key> | |
| <string>auto</string> | |
| <key>IDECodeSnippetCompletionScopes</key> | |
| <array> | |
| <string>CodeBlock</string> | |
| </array> |
| require 'json' | |
| require 'net/http' | |
| module Fastlane | |
| module Actions | |
| class MfbLatestHockeyBuildAction < Action | |
| def self.run(config) | |
| host_uri = URI.parse('https://rink.hockeyapp.net') | |
| http = Net::HTTP.new(host_uri.host, host_uri.port) | |
| http.use_ssl = true |