|
Hi I heard most elegant property of java is Garbage Collection I wanna know does it guarantee that a program will not run out of memory?
Answer Snippets (Read the full thread at stackoverflow):
It will not even guarantee that....
No, garbage collection cannot guarantee that your application will not run out of memory.
It is perfectly possible for a programmer to mistakingly create for recycling .
No it does not guarantee this.
|
|
The workflow is being published as a wcf service, and I need to guarantee that workflows execute sequentially. Is there a way--in code or in the config--to guarantee the runtime doesn't launch two workflows concurrently?
Started by Brian on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Consider though that its the responsibility of the work flow itself... .
There is no way to configure the runtime to limit the number of workflows in progress .
If found, cancel it.
You probably will need to check at workflow start for another running instance .
|
|
Using C or C++, After I decrypt a file to disk- how can I guarantee it is deleted if the application crashes or the system powers off and can't clean it up properly? Using C or C++, on Windows and Linux?
Started by Klathzazt on
, 14 posts
by 14 people.
Answer Snippets (Read the full thread at stackoverflow):
And it may be possible.
If the user unplugs the computer you can't guarantee that the file will be deleted.
|
Ask your Facebook Friends
|
I am using a linkedHashMap to guarantee order when someone tries to access it. However, when it comes time to iterate over it, does using entrySet() to return key/value pairs guarantee order as well? No changes will be made while iterating.
EDIT: Also...
Started by Diego on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
(A key k is reinserted into a map ....
Note that insertion order is not affected if a key is re-inserted into the map .
This linked list defines the iteration ordering, which is normally the order in which keys were inserted into the map (insertion-order) .
|
|
When a file is closed using close() or fclose() (for example), does Linux guarantee that the file is written back to (persistent) disc?
What I mean is, if close() returns 0 and then immediately afterwards the power fails, are previously written data guaranteed...
Started by MarkR on
, 8 posts
by 8 people.
Answer Snippets (Read the full thread at stackoverflow):
From " man 2 close....
I don't think Linux can guarantee this since the drive itself can cache data too.
There is some controversy in the Linux kernel world because even fsync doesn't guarantee and the disk never knows the file was there.
|
|
I have code that controls a mutex lock/unlock based on scope:
void PerformLogin() { ScopeLock < Lock > LoginLock( &m_LoginLock ); doLoginCommand(); ScopeLock < SharedMemoryBase > MemoryLock( &m_SharedMemory ); doStoreLogin(); ... }
Can I guarantee...
Started by Alan on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
Hence you could not guarantee t2's destructor.
}
If C++ did not guarantee for t1 to be destroyed before t2's destructor ran.
Consider
void Foo() { Type1 t1; Type2 t2(&t1); ...
On the stack.
|
|
Who will guarantee Floyd? Arum can guarantee $60M to Manny...but who will do for Floyd??? Ellerbe? LOL?
Started by Vino Rotcha Kosya on
, 9 posts
by 9 people.
Answer Snippets (Read the full thread at yahoo):
He has been using Golden Boy (in terms of the money it generates... .
The warden can guarantee Floyd of 60M azzbanging.lol Floyd can get a guarantee by finding investors with Golden Boy Promotions and try to get a guarantee from them as well.
|
|
In Java, I use
if (a != null && a.fun());
by taking full advantage of short-circuit evaluation and expression are evaluated from left to right?
In C++, can I do the same? Are they guarantee to portable across different platform and compiler?
if (a != ...
Started by Yan Cheng CHEOK on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
See also: http://stackoverflow.com/questions/628526/is-short-circuiting-boolean-operators-mandated-in-c-c-and-evaluation-order
Yes, it is guaranteed for the "built....
&& and || short circuit in C and C++; it is guaranteed by the standard.
|
|
Say I have 3 strings in a List (e.g. "1","2","3").
Then i want to reorder them to place "2" in position 1 (e.g. "2","1","3").
I am using this code (setting indexToMoveTo to 1):
listInstance.Remove(itemToMove); listInstance.Insert(indexToMoveTo, itemToMove...
Started by SuperSuperDev1234 on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
The List<> class does guarantee ordering - things will be retained in the list in the order; guarantee that items will be returned in the order they were added?
Here's 4 items, with their index.
|
|
I was stuck at one question in an interview.
Given two threads, and each one has a lock, how to guarantee no deadlock.
My knowledge is that it is not easy to avoid deadlock, that's why I got stuck. Can anybody give a hint.
Thanks!
Started by skydoor on
, 7 posts
by 7 people.
Answer Snippets (Read the full thread at stackoverflow):
With a single lock it's not possible to get....
The description is a bit lacking, but if you impose a locking order (e.g, if the locks are A and B, never lock B unless you already locked A, and never release A while B is locked), then deadlock won't occur .
|