Fixed two CF memory leaks. (Fixes issue #5)
5 // Created by Jens Alfke on 4/24/09.
6 // Copyright 2009 Jens Alfke. All rights reserved.
9 #import "MYDNSService.h"
12 /** An asynchronous DNS address lookup. Supports both Bonjour services and traditional hostnames. */
13 @interface MYAddressLookup : MYDNSService
16 UInt16 _interfaceIndex;
17 NSMutableSet *_addresses;
19 CFAbsoluteTime _expires;
22 /** Initializes the lookup with a DNS hostname. */
23 - (id) initWithHostname: (NSString*)hostname;
25 /** The port number; this will be copied into the resulting IPAddress objects.
26 Defaults to zero, but you can set it before calling -start. */
27 @property UInt16 port;
29 /** The index of the network interface. You usually don't need to set this. */
30 @property UInt16 interfaceIndex;
32 /** The resulting address(es) of the host, as HostAddress objects. */
33 @property (readonly) NSSet *addresses;
35 /** How much longer the addresses will remain valid.
36 If the value is zero, the addresses are no longer valid, and you should instead
37 call -start again and wait for the 'addresses' property to update.
38 If you set the service to continuous mode, addresses will never expire since the
39 query will continue to update them. */
40 @property (readonly) NSTimeInterval timeToLive;