15,909,051 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by TheRedEye (Top 8 by date)
TheRedEye
18-Jan-22 3:39am
View
Right, but I didn't know if there's an underlying use of a dictionary within the ObservableCollection, since the rest of the stack trace indicates the DataGrid.
TheRedEye
20-Jun-20 2:54am
View
Thanks Gerry. Your last statement sounds contradictory unless I'm misunderstanding. Aren't the EF entities the Model in the V-VM-M-DAL? And aren't the custom POCOs the viewmodels in the V-VM-M-DAL?
TheRedEye
31-Aug-18 10:43am
View
Yes, its unmanaged code.Thanks Richard, unmanaged dll is what I should have been googling help with.
TheRedEye
30-Aug-18 5:36am
View
All the searched examples that show refection as the solution make use of .Net assemblies. This DLL isn't a .net assembly, it's LabView made library.
TheRedEye
4-Nov-15 7:17am
View
So in the above example, please correct me I'm wrong with any of this.
ListOfThings and MyItems are pointers to the same object in the heap. So calling FreeAndNil(ListOfThings) will also free MyItems. And MyItems is the parent and owner of every instance of AnItem. So when MyItems is freed, then all the instances of AnItem are also freed. Is this correct?
TheRedEye
3-Nov-15 8:47am
View
Thanks for your reply, the articles helped. In the following code does the FreeAndNil(ListOfThings) free all necessary objects?
function GetList(): TObjectList<tsomeobject>;
var
MyItems: TObjectList<tsomeobject>;
AnItem: TSomeObject;
i: integer;
begin
MyItems := TObjectList<tsomeobject>.Create();
for I := 0 to 9 do
begin
AnItem := TSomeObject.Create();
MyItems.Add(AnItem); // MyItems becomes owner of each AnItem.
end;
Result := MyItems;
end;
procedure DoSomething();
var
ListOfThings: TObjectList<tsomeobject>;
begin
ListOfThings := GetList();
// ....
FreeAndNil(ListOfThings); // will this free ListOfThings, MyItems and all 10 of AnItem objects?
end;
TheRedEye
16-Jul-14 10:27am
View
Yes, but specifically, what SQL statements are generated. I'm trying to see if I can get a performance improvement here. Does my example make 3 round trips to the server or just one?
Linq will normally build a sql statement and only execute that statement against the database when the collection is iterated. However I cannot find any documentation on when/how linq-to-sql stored proc execute the built sql statement.
I've also tried using LINQPad to see the sql generated, but strangely stored procs in LINQPad seem to return a 'ReturnDataSet' data type as opposed to visual studio which returns ISingleResult<testlinqresult> as the anonymous type.
TheRedEye
18-Sep-12 6:21am
View
Thanks andrevdcolff, you're a hero. Works great.
Show More