Click here to Skip to main content
15,900,656 members
Home / Discussions / C#
   

C#

 
QuestionSystem.Data.OracleClient - "System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt." [modified] Pin
devvvy8-Apr-09 14:58
devvvy8-Apr-09 14:58 
QuestionLarge memory usage. Pin
Jacob Dixon8-Apr-09 14:55
Jacob Dixon8-Apr-09 14:55 
AnswerRe: Large memory usage. Pin
Jacob Dixon8-Apr-09 15:00
Jacob Dixon8-Apr-09 15:00 
AnswerRe: Large memory usage. Pin
Luc Pattyn8-Apr-09 15:04
sitebuilderLuc Pattyn8-Apr-09 15:04 
GeneralRe: Large memory usage. Pin
Jacob Dixon8-Apr-09 15:10
Jacob Dixon8-Apr-09 15:10 
GeneralRe: Large memory usage. Pin
Luc Pattyn8-Apr-09 15:15
sitebuilderLuc Pattyn8-Apr-09 15:15 
GeneralRe: Large memory usage. Pin
Jacob Dixon8-Apr-09 16:52
Jacob Dixon8-Apr-09 16:52 
GeneralRe: Large memory usage. Pin
Luc Pattyn8-Apr-09 17:17
sitebuilderLuc Pattyn8-Apr-09 17:17 
Hi Jacob,

yes tasks that may take several hundreds of milliseconds or more should not be organized on the main or GUI thread, since that adversely affects the GUI's responsiveness.
The solution basically is using a thread, i.e. either a Thread class instance, or a ThreadPool item, or a BackgroundWorker.

Threads are either foreground or background; background means they don't prevent your app from exiting. Therefore, real background stuff, things that are relevant to the user as long as the app is running, but not when the app stops, should be organized in a background thread. Then, an explicit abort is not needed. Aborting a thread can be messy, you don't know in general what exactly it is/was doing at the moment you issue the abort command, hence a lot of objects and resources could be in an unknown state.

BackgroundWorkers are always running in the background. ThreadPool threads are not, and should never be aborted (well aborting them on app exit may be OK).

Things that are important to finish, should not be run in background, e.g. a database update. You don't want your app to exit in the midst of a DB update, so you may have to take special precautions for that.

I can't help you with the VARBINARY stuff.
I am not sure what you want about the progress bar; in general operations that you order as a single command will not allow you to see any progress, they are either ongoing or done, without any intermediate quantization.

Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]

- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets


GeneralRe: Large memory usage. Pin
harold aptroot8-Apr-09 15:35
harold aptroot8-Apr-09 15:35 
GeneralRe: Large memory usage. Pin
Luc Pattyn8-Apr-09 15:58
sitebuilderLuc Pattyn8-Apr-09 15:58 
GeneralRe: Large memory usage. Pin
harold aptroot8-Apr-09 16:37
harold aptroot8-Apr-09 16:37 
GeneralRe: Large memory usage. Pin
Luc Pattyn8-Apr-09 17:05
sitebuilderLuc Pattyn8-Apr-09 17:05 
GeneralRe: Large memory usage. Pin
Dave Kreskowiak8-Apr-09 17:47
mveDave Kreskowiak8-Apr-09 17:47 
GeneralRe: Large memory usage. Pin
harold aptroot9-Apr-09 4:59
harold aptroot9-Apr-09 4:59 
GeneralRe: Large memory usage. Pin
Dave Kreskowiak9-Apr-09 13:16
mveDave Kreskowiak9-Apr-09 13:16 
GeneralRe: Large memory usage. Pin
harold aptroot9-Apr-09 13:38
harold aptroot9-Apr-09 13:38 
GeneralRe: Large memory usage. Pin
S. Senthil Kumar8-Apr-09 23:03
S. Senthil Kumar8-Apr-09 23:03 
GeneralRe: Large memory usage. Pin
harold aptroot9-Apr-09 5:00
harold aptroot9-Apr-09 5:00 
GeneralRe: Large memory usage. Pin
Jacob Dixon9-Apr-09 5:16
Jacob Dixon9-Apr-09 5:16 
GeneralRe: Large memory usage. Pin
Luc 6480119-Apr-09 5:39
Luc 6480119-Apr-09 5:39 
AnswerRe: Large memory usage. Pin
Anubhava Dimri8-Apr-09 19:57
Anubhava Dimri8-Apr-09 19:57 
GeneralRe: Large memory usage. Pin
Jacob Dixon9-Apr-09 3:20
Jacob Dixon9-Apr-09 3:20 
GeneralRe: Large memory usage. Pin
Anubhava Dimri9-Apr-09 18:29
Anubhava Dimri9-Apr-09 18:29 
QuestionSelectedIndexChanged problem regarding combobox and data grid Pin
dave18168-Apr-09 14:40
dave18168-Apr-09 14:40 
AnswerRe: SelectedIndexChanged problem regarding combobox and data grid Pin
Christian Graus8-Apr-09 14:42
protectorChristian Graus8-Apr-09 14:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.