G
Guest
Hi,
Once I wrote a singlethreaded program containing a somewhat large tree
structured set of objects. A treeview was assigned this structure and it was
possible to drag and drop objects - i.e. reorganize the tree structure. Each
object, tagged to a tree node, had a ref to its own userform, however, after
a drag drop operation a non-reproducable bug sometimes occured stating that
the reference was lost and an exception occured. A more .Net experienced
programmer told me that it possibly was the memory manager that was
reorganizing my objects in the memory at the same time I reorganised them and
that I should try to use the lock keyword while I reorganised the tree
structure. Could he be right?
And if yes...
I've searched the net for information on this but all articles I've found
revolves around multithreaded applications. Do you know any articles that
covers this use of the lock keyword - I would like to learn to do it right?
Best regards Jesper, Denmark.
Once I wrote a singlethreaded program containing a somewhat large tree
structured set of objects. A treeview was assigned this structure and it was
possible to drag and drop objects - i.e. reorganize the tree structure. Each
object, tagged to a tree node, had a ref to its own userform, however, after
a drag drop operation a non-reproducable bug sometimes occured stating that
the reference was lost and an exception occured. A more .Net experienced
programmer told me that it possibly was the memory manager that was
reorganizing my objects in the memory at the same time I reorganised them and
that I should try to use the lock keyword while I reorganised the tree
structure. Could he be right?
And if yes...
I've searched the net for information on this but all articles I've found
revolves around multithreaded applications. Do you know any articles that
covers this use of the lock keyword - I would like to learn to do it right?
Best regards Jesper, Denmark.