Questions tagged [weak]

128 questions
0
votes
1 answer

Navigation items with custom views disappear in iOS 14

Since updating my iPhone to iOS 14 beta 2 (and released 14.0) I have crashes due to nil implicitly-unwrapped (!) weak @IBOutlets and missing Storyboard-created left and right navigation items. When running the app I can see the items appear and then…
Rivera
  • 10,792
  • 3
  • 58
  • 102
0
votes
1 answer

What is the Objective-C equivalent of 'weak self' in a Swift closure?

Could you tell me the equivalent of: var didTapURL: ((_ url: URL) -> Void)? .......... myObject.didTapURL = { [weak self] (url) in self?.manageUrl(url) } in Objectice-C?
Anthony
  • 2,801
  • 3
  • 30
  • 49
0
votes
1 answer

In Swift, how would I reference `self` in nested timers?

If I would nest two timers that are both properties of the class they are referenced in, would I have to call [weak self] in both or just the first timer block? timer1 = Timer.scheduledTimer(withTimeInterval: 2, repeats: false) { [weak self] _ in …
Patia1999
  • 67
  • 1
  • 7
0
votes
1 answer

Why weak property of associated object is not nilled out if I call its getter?

Though it's kind of stupid in 2020 that I'm still asking question about ObjC, please be patient and considerate... I'm reading the source code of BloksKit and ran into a weird situation. #import @interface…
刘maxwell
  • 187
  • 10
0
votes
0 answers

Entity Framework 6 Weak Entity mapping expects a key to be present on add migration

in our domain we have entity aggregate which is consist of ParkingLot : public class ParkingLot : EntityBase { public string Title { get; set; } public int EntryNumber { get; set; } public int Floor { get; set; } public int…
BehiAlav
  • 178
  • 7
0
votes
1 answer

C# weak reference still valid after object GC?

I've got a quick code piece to test weak reference, I expect that after the object being GC, the weak reference should not longer return a object referenct. But my test shows this is not expected: class Person { private int mI = 3; public…
Troskyvs
  • 7,537
  • 7
  • 47
  • 115
0
votes
0 answers

Override a weak var property?

I have a class with a weak var, for example : class Foo { weak var myVar : UILabel! } If a build a subclass, can I override the property without the weak key? I tried with the following code but I received : class Foo2 : Foo{ override var…
0
votes
1 answer

Java weak reference is not freed after System.gc()

I've got a simple snippet: Integer integer = 2; WeakReference wi = new WeakReference<>(integer); WeakReference sr = new WeakReference<>(new…
Hind Forsum
  • 9,717
  • 13
  • 63
  • 119
0
votes
1 answer

How can I create "weak" function and use it with objects?

I'm writing a class, called "MQTT_interface". I need to use "callback" function in method "reconnect" of this class. I suppose that developer, will write function "callback" for himself, and if not there will be a kind of weak function with the same…
0
votes
1 answer

swift tableView in custom view programatically - losing reference to controllers delegate and data source

I am trying to learn MVVM pattern and writing all my views programatically using Snapkit. I am creating hamburger menu which consist of simple tableView and I have a problem, that my tableView in cusom view is losing delegate and data source…
Róbert Oravec
  • 213
  • 4
  • 10
0
votes
1 answer

Java HttpURLConnection connect using Weak Ciphers

I am working on a vulnerability scanner in Java to check for websites that allow connections using weak cipher suites. So I would, for example, try to connect using 56 bits "SSL_DHE_RSA_WITH_DES_CBC_SHA" (or other weak ciphers) and if I get say 200…
sys147
  • 23
  • 1
  • 4
0
votes
1 answer

Creating an RC4 / DES SSL PFX

I'm trying to check a specific IIS configuration, which should reject weak SSL certificates. How would I go about creating an SSL certificate with either RC4 or DES encryption? I've tried using openssl with the -des flag, but it seems to still…
Yoav Lavi
  • 365
  • 1
  • 3
  • 10
0
votes
0 answers

__attribute__((weak)) doesn't work

I have wrote below code: #include #include int pthread_create( pthread_t*, const pthread_attr_t *, void* (*)(void *), void*) __attribute__ ((weak)) ; int main(){ if (pthread_create) { …
shengfu zou
  • 560
  • 1
  • 7
  • 16
0
votes
0 answers

APACHE: Cipher for TLS_RSA_WITH_3DES_EDE_CBC_SHA is not working

I have the following line in my httpd.conf: SSLCipherSuite…
0
votes
1 answer

Was there a a time when PHP's rand() function was used as an exploit?

Does anybody know if there was a time or event where somebody used rand()'s weakness in order to predict exploit it? Something like generating tokens or cheating in video games? Since prior to PHP 7, rand() was very easy to crack. In fact here is…
Redseb
  • 199
  • 10
1 2 3
8 9