3,831 questions
2
votes
1
answer
22
views
Arc: how to enable audio player for my own website?
I'm trying to enable the Arc browser audio player on a webpage of mine.
I cannot find any documentation from Arc targeted to developers though, so I tried by using what works for Google Chrome, but it ...
0
votes
0
answers
20
views
Teloxide message handler error: Injectable< , , , > is not implemented
My bot should identify message style, so I have create handler
As you can see in my code, I use Arc<RwLock>.
But I have met a challenges. Please help me
This is my error when the code that's ...
1
vote
2
answers
57
views
Should 'self' be explicitly specified in closure with weak reference to self in capture list?
DispatchQueue.main.async {
view.setNeedsLayout()
}
With above code we get expected error: Implicit use of 'self' in closure; use 'self.' to make capture semantics explicit.
It's known that the ...
0
votes
0
answers
32
views
ARC and the release of custom objects passed into async network methods
In my app I’m running into a problem leaking custom objects passed into a chain of methods that store HTML files into a custom object. Where each method finds a local copy of a file, the file is read ...
0
votes
2
answers
81
views
mutate dynamically sized vec in parallel
I'm trying to mutate a dynamically sized (i.e. under certain conditions, new values are pushed, and pop() gets called in every iteration) Vec in parallel. Am I doing anything wrong in this working ...
0
votes
0
answers
52
views
Deallocation for NSTextView in Objective-C
I am learning to create a Cocoa application on Mac OS and have run into an issue with memory I don't quite understand. From what I've read with non-ARC is that you should be releasing anything you've ...
0
votes
0
answers
27
views
Instantiating ONNX Session and Environment and overcoming borrowing error without having to use unsafe pointers [duplicate]
I have been trying to instantiate an ONNX runtime environment and session within a struct that can also contain all of the public methods I need. I have a working solution, however this requires the ...
0
votes
0
answers
52
views
Fill a matrix in parallel - how to convert `Vec<Arc<Mutex<Vec<_>>>>` to Vec<Vec<_>>`
I'm learning Rust and just finished the Fearless Concurrency chapter in the Rust book, so am trying to fill up the rows of a matrix in parallel.
My matrix is large, so I send a chunk of rows to each ...
0
votes
1
answer
125
views
How does the NSWindow isReleasedWhenClosed property work when using ARC?
In Objective-C with ARC or Swift (which always uses ARC), what difference does it make whether isReleasedWhenClosed is true or not? Won't a window be kept alive as long as my code has strong ...
0
votes
1
answer
167
views
Acquiring an access token using REST API on a ARC Connected VM
I'm wanting to connect a On-Prem VM to Azure KeyVault. I have installed the Azure Arc Agent successfully and can see the VM under ARC Machines in Azure.
However when I go to request the API token as ...
1
vote
1
answer
129
views
Is there a sound way to convert/transmute from Arc<String> to Arc<Vec<u8>>
String and Vec<u8> have the same memory layout, although this is not guaranteed.
String also has an into_bytes method returning a Vec<u8>.
Is there a sound way to convert from an Arc<...
1
vote
1
answer
56
views
Weak var in Swift Tree implementation
I am trying to build a tree implementation in Swift to represent a chess game.
A game consists of a sequence of moves but alternative moves for a given board position are valid. I want to traverse the ...
1
vote
1
answer
35
views
Why is a CALayer retained after I stop referencing it?
I've the impression that my CALayer is retained after being added as a sublayer until the end execution block, instead of until I stop referencing it.
The parent UIView is however released as soon as ...
0
votes
0
answers
62
views
Cocoa application produces a lot of "inactive" memory
I am developing software in Objective-C that reads files in chunks and processes them. I noticed with very large files it slows down a lot. Looking in activity monitor it's pretty clear what's going ...
0
votes
0
answers
100
views
iOS 17 UIImageReader cause memory leak
In my SwiftUI view, I try to load the image from the data.
var body: some View {
Group{
if let data = model.detailImageData, let uiimage = UIImage(data: data) {// no memory issue
...