# new SHeaderRow::Column gets overriden each time and points to the same memory address

**URL:** <https://forums.unrealengine.com/t/new-sheaderrow-column-gets-overriden-each-time-and-points-to-the-same-memory-address/468362>\
**Category:** UI\
**Tags:** unreal-engine, memory, pointer, slate, CPP, question\
**Created:** [July 19, 2020, 8:25am UTC](https://forums.unrealengine.com/t/new-sheaderrow-column-gets-overriden-each-time-and-points-to-the-same-memory-address/468362 "2020-07-19T08:25:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![SevenOperation](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SevenOperation](https://forums.unrealengine.com/u/SevenOperation)\
**Post date:** [July 19, 2020, 8:25am UTC](https://forums.unrealengine.com/t/new-sheaderrow-column-gets-overriden-each-time-and-points-to-the-same-memory-address/468362/1 "2020-07-19T08:25:27Z")

</div>

I am trying to get a header row into my displayed table list but somehow the column pointer stays the same every time so that it displays the last column for everything since all point to that location in memory what am I doing wrong?  
Code:   
` TSharedPtr MyListView::generateHeaderRow() { TSharedPtr headerRow = SNew(SHeaderRow); TArray<FString> a = TArray<FString>(); a.Add("ABC"); a.Add("DEF"); a.Add("GHI"); a.Add("JKL"); a.Add("MNO"); a.Add("PQR"); a.Add("STU"); for (int i = 0; i < a.Num(); i++) { const FString columnIdString = FString(*a[i]); SHeaderRow::FColumn column = SHeaderRow::Column(*columnIdString); headerRow->AddColumn(column); } return headerRow; }`

Would appreciate any help, thanks in advance.

---

<div class="post-metadata">

**Author:** ![SevenOperation](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SevenOperation](https://forums.unrealengine.com/u/SevenOperation)\
**Post date:** [July 29, 2020, 3:59pm UTC](https://forums.unrealengine.com/t/new-sheaderrow-column-gets-overriden-each-time-and-points-to-the-same-memory-address/468362/2 "2020-07-29T15:59:55Z")

</div>

Ok i didn’t found a solution but a workaround, i just defined the Column then when i needed it so now it looks like that  
headerRow-\>AddColumn(SHeaderRow::Column(\*columnId).DefaultLabel(FText::FromString(\*columnIdString)));
