Click here to Skip to main content
15,918,808 members
Home / Discussions / C#
   

C#

 
GeneralRe: A question related to Computers connection using C# Pin
CoderForEver16-Aug-09 21:54
CoderForEver16-Aug-09 21:54 
GeneralRe: A question related to Computers connection using C# Pin
Saksida Bojan16-Aug-09 23:43
Saksida Bojan16-Aug-09 23:43 
GeneralRe: A question related to Computers connection using C# Pin
Henry Minute17-Aug-09 0:59
Henry Minute17-Aug-09 0:59 
GeneralRe: A question related to Computers connection using C# Pin
CoderForEver17-Aug-09 8:33
CoderForEver17-Aug-09 8:33 
QuestionMore marshaling woes :-( Pin
DaveyM6916-Aug-09 8:48
professionalDaveyM6916-Aug-09 8:48 
AnswerRe: More marshaling woes :-( Pin
Luc Pattyn16-Aug-09 8:58
sitebuilderLuc Pattyn16-Aug-09 8:58 
GeneralRe: More marshaling woes :-( Pin
DaveyM6916-Aug-09 9:51
professionalDaveyM6916-Aug-09 9:51 
GeneralRe: More marshaling woes :-( Pin
Luc Pattyn16-Aug-09 10:33
sitebuilderLuc Pattyn16-Aug-09 10:33 
pro GCHandle:
- avoids copying, which doubles the memory load, and trashes the cache.
- pinned arrays are read/write, they pass data both ways.
- you can free the GCHandle much later (when all the native stuff is done dealing with the array, could be more than one native call there, even async stuff).
- conceptually simpler than a lot of the Marshal stuff

contra GCHandle:
- unknown cost, assumed irrelevant for large arrays (I often do megabytes of image data)
- pinned means GC can't move, however >80KB is large-object heap anyway, and that one never(hardly ever?) compacts (that is bad in general, not due to GCHandle).
- needs more code in simple cases
- coder is responsible for freeing (I have an LP_Pinner class that implements IDisposable, hence using construct). See TrayIconBuster article.

Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]

The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.

GeneralRe: More marshaling woes :-( Pin
DaveyM6917-Aug-09 0:46
professionalDaveyM6917-Aug-09 0:46 
GeneralRe: More marshaling woes :-( Pin
Luc Pattyn17-Aug-09 1:13
sitebuilderLuc Pattyn17-Aug-09 1:13 
GeneralRe: More marshaling woes :-( Pin
DaveyM6917-Aug-09 1:50
professionalDaveyM6917-Aug-09 1:50 
AnswerRe: More marshaling woes :-( Pin
Hristo-Bojilov16-Aug-09 9:04
Hristo-Bojilov16-Aug-09 9:04 
GeneralRe: More marshaling woes :-( Pin
DaveyM6916-Aug-09 10:03
professionalDaveyM6916-Aug-09 10:03 
GeneralAdditional information Pin
Pete O'Hanlon16-Aug-09 10:22
mvePete O'Hanlon16-Aug-09 10:22 
GeneralRe: Additional information Pin
Luc Pattyn16-Aug-09 10:38
sitebuilderLuc Pattyn16-Aug-09 10:38 
GeneralRe: Additional information Pin
Pete O'Hanlon16-Aug-09 10:41
mvePete O'Hanlon16-Aug-09 10:41 
GeneralRe: Additional information Pin
DaveyM6916-Aug-09 10:52
professionalDaveyM6916-Aug-09 10:52 
GeneralRe: Additional information Pin
Pete O'Hanlon16-Aug-09 10:58
mvePete O'Hanlon16-Aug-09 10:58 
GeneralRe: Additional information Pin
Luc Pattyn16-Aug-09 11:14
sitebuilderLuc Pattyn16-Aug-09 11:14 
GeneralRe: Additional information Pin
Pete O'Hanlon16-Aug-09 11:19
mvePete O'Hanlon16-Aug-09 11:19 
GeneralRe: Additional information Pin
DaveyM6916-Aug-09 11:50
professionalDaveyM6916-Aug-09 11:50 
QuestionSelected tab that affect on listbox Pin
tamir90116-Aug-09 8:15
tamir90116-Aug-09 8:15 
AnswerRe: Selected tab that affect on listbox Pin
tamir90116-Aug-09 9:38
tamir90116-Aug-09 9:38 
GeneralRe: Selected tab that affect on listbox Pin
Saksida Bojan16-Aug-09 10:57
Saksida Bojan16-Aug-09 10:57 
GeneralRe: Selected tab that affect on listbox Pin
Luc Pattyn16-Aug-09 11:34
sitebuilderLuc Pattyn16-Aug-09 11:34 

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.