Questions tagged [resource-management]

142 questions
2
votes
1 answer

MS Project - Adding multiples of the same resources to multiple concurrent tasks

I'm currently working on a project within MS Project and have most aspects covered apart from resources. I want to add multiple versions of the same resource (in this case a generic employee) to some tasks. I also have concurrent tasks which these…
2
votes
2 answers

Is a million users hitting one file on the server the same as a million users hitting a million different files?

Is a million users hitting one file on the server the same as a million users hitting a million different files?
Faisal Abid
  • 8,900
  • 14
  • 59
  • 91
2
votes
0 answers

Perils of C++ implicit conversion

I'm writing some managed handle container, not unsimilar to std::unique_pointer (although I'm not writing my code in C++11 yet). I have something like this: template class UniqueHandle { H h; public: UniqueHandle(H _h = 0) // "the…
the swine
  • 10,713
  • 7
  • 58
  • 100
2
votes
1 answer

Are there any alternative concepts for handling unmanaged resources in garbage collected languages?

Garbage collected object oriented programming languages reclaim unused memory automatically, but all other kinds of resources (i.e. files, sockets...) still require manual release since finalizers cannot be trusted to run in time (or at…
Askaga
  • 6,061
  • 5
  • 25
  • 49
2
votes
2 answers

Manually opening a Java 7 auto-managed resource

So Java 7 has a nifty feature that automatically closes an AutoCloseable class. If I have Bar implement Closeable (which in turn extends AutoCloseable), and have a way to get an open Bar from a Foo, I can do this: try(Bar bar=foo.openBar()) //do…
Garret Wilson
  • 18,219
  • 30
  • 144
  • 272
1
vote
1 answer

UIWebView: Access to OS graphics/resources?

I am using a UIWebView instance to show a help page in an app. Within that HTML can I make reference to graphics provided by the OS (e.g., backgrounds, icons, etc.)? What would be the URLs to said resources?
fbrereto
  • 35,429
  • 19
  • 126
  • 178
1
vote
0 answers

Storing and loading internationalized resources from other storage mechanisms

We have a feature request for a Windows Forms application where we want to give the sys admin the ability to redefine application strings and other internationalizable values (control widths/placement/etc.) after the application has been compiled…
Andy White
  • 86,444
  • 48
  • 176
  • 211
1
vote
0 answers

Resource management with Concurrency

ExecutorService executor = Executors.newSingleThreadExecutor(); Callable task = () -> getConnection(); // a complicated method but safe from resource leaks try (Connection connection = timeOut == null ?…
Teddy Tsai
  • 414
  • 1
  • 13
1
vote
1 answer

How can I compose resources in Scala while still closing them correctly with scala-arm?

I have a class that takes a local file, transforms it, and stores it in GCS: import java.nio.channels.Channels import java.nio.file.{ Files, Path } import java.util.zip.{ GZIPOutputStream, ZipInputStream } import com.google.cloud.storage.{…
Etienne Neveu
  • 12,604
  • 9
  • 36
  • 59
1
vote
1 answer

What's general memory ownership rules for returning pointers from POSIX functions?

Today I was trying to call strerror POSIX function. It returns a char*, and now I am not sure whether to free it or not to free it. The application shall not modify the string returned. I think the returning pointer is supposed to be a pointer to…
eonil
  • 83,476
  • 81
  • 317
  • 516
1
vote
1 answer

What is Unmanaged Application Master and its role in the yarn federation hadoop?

I am not getting much information about working of Unmanaged AM. I just know the basic definition about it but still not sure how their management is done and by whom it is done? Also in apache document, it is mentioned (point 8 in job execution…
anand011090
  • 65
  • 10
1
vote
3 answers

Are there examples for programming-languages support automatic management of resources besides memory?

The idea of automatic memory management has gained big support with new programming languages. I'm interested if concepts exists for automatic management of other resources like files, network-sockets etc.?
Mnementh
  • 50,487
  • 48
  • 148
  • 202
1
vote
0 answers

How to set Firefox resource management

I've got a web application that is spread out over three monitors (three seperate windows that communicate between each other using a broadcast channel). On the screens I show multiple video streams (up to four per screen) in MJPEG format. All video…
Sand0rf
  • 140
  • 1
  • 1
  • 12
1
vote
0 answers

Node.js express resource management

Given the following situation: A Node.js express app with some routes and modules app.js /routes |-user.js |-login.js |-e.t.c. /modules |-logger.js Let's say that all the routes need the logger to do proper error handling and logging. Would it…
NG.
  • 459
  • 1
  • 6
  • 20
1
vote
2 answers

Should I explicitly close ZipOutputStream over response.getOutputStream()?

I have read following topic: Should one call .close() on HttpServletResponse.getOutputStream()/.getWriter()? But what if I use following construction: ZipOutputStream zos = new ZipOutputStream(response.getOutputStream()); Should I close it or…
gstackoverflow
  • 36,709
  • 117
  • 359
  • 710